[ale] Q: directing stream I/O _the_C++_way_

John Mills johnmills at speakeasy.net
Sat Nov 27 10:53:34 EST 2004


ALErs -

I want to optionally start a C++ program with the name of a file for its
log activity, else have the output sent to the console as presently.  (I
use 'cout'). What's a simple way to alternatively connect an output stream
to 'stdout' or a named file? (For my own learning, I would rather use
"C++-style" than "C-style" operators.)

A pointer to a nice on-line manual for this type inquiry would also be 
nice.

TIA.

 - John Mills
   john.m.mills at alum.mit.edu



More information about the Ale mailing list