Hello Brian!
Monday October 27 1997 15:09, Brian S wrote to All:
BS> #include
BS> class myoutput {
BS> public:
BS> void operator<< (char* s)
replace this with:
myoutput &operator<< (char *s)
BS> {
BS> cout << s;
then add:
return *this;
BS> }
BS> };
BS> void main ()
BS> {
BS> myoutput write;
BS> write << "Hello" << "World";
Then when its called here, the first one prints "Hello", and returns itself
(basically), which is then called for the second string, which prints
"World", returning itself again, which we don't use...
Christopher
E-Mail: chris@db-bbs.coracle.com
--- FMailX32 1.22
---------------
* Origin: Death Butler BBS, +44-1582-620141, 24 Hours (2:257/135)
|