|
From: David M. <ci...@ya...> - 2004-02-23 19:09:46
|
I am looking to creating my own C++ stream class.
For now all I want to do is overload the << operator so I can send
data to a file and the screen, this is to try to prevent:
cout << x;
log_file << x;
Essentially I want to do something like:
my_stream log_out("log.txt");
log_out << x; //Sends to both screen & log.txt.
Wrapping this in a function is not exactly the best solution as I
lose the ability to use the manipulators or I would have to fall back
to using variable argument lists and sprintf().
Does any one know a tutorial or book that could help me?
Thanks in Advance
David McKen
__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools
|