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)
|