ostream,..

Selim Issever (issever@mail.desy.de)
Tue, 17 Feb 1998 16:09:25 +0100 (MET)


Dear all,..

I have a class, in which I want to control the way its output is done.
Everything compiles well,.. and I can create TRange objects,.. but:

root [0] TRange b
root [1] cout << b << endl;
root [2] cout << "hello" << endl;
hello
root [3]

The code is below,.. what did I wrong again???
ThanX and best regards
Selim

// --------------------------------------------------
#ifndef TRange_H
#define TRange_H

#include <iostream.h>
#include "/usr/local/root/include/TObject.h"

class TRange : public TObject {
public:
[...delete...]

friend ostream& operator<< (ostream& AStrm, const TRange& ARange) {
AStrm << "hello";
return AStrm;
}

ClassDef(TRange, 1) // A Variable that is connected to a TTree branch.
private:
[...delete...]
};
#endif //--------------------------------------------

S E L I M I S S E V E R
DESY-F15, Notkestr. 85, 22603 Hamburg, Germany; Tel/Fax: 040 8998-2843/4033
http://www.physik.uni-dortmund.de/~issevers; selim.issever@desy.de
Ete kemige burundum, Yunus diye gorundum. Yunus Emre