TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: ALL
from: BRIAN S
date: 1997-10-27 15:09:00
subject: write

I was trying to make a class that worked similar to the cout class, just for 
some practice and I was wondering if anyone could help.  This is what I have 
done so far :
--------------------------------------------------------------------------
#include 
class myoutput {
  public:
    void operator<< (char* s)
      {
        cout << s;
      }
};
void main ()
{
  myoutput write;
  write << "Hello World";
}
--------------------------------------------------------------------------
I would like to be able to call my << function multiple times like the cout 
class.  for example :
write << "Hello " << "World";
Can anyone help?
                          Drumstick
                      อออออออO Oอออออออ
--- FMail/Win32 1.22
---------------
* Origin: CompuNerds BBS (602)497-2219 Mesa Arizona (1:114/480)

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™.