TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: BRIAN S
from: CHRISTOPHER BUTLER
date: 1997-10-30 11:51:00
subject: write

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.