cout assign

nbecker@fred.net nbecker@fred.net
Fri Mar 5 13:33:00 GMT 1999


I want to redirect cout to a file.  We have an assign operator for
cout, but it doesn't work, and the source iostream.cc says it's not
really supported.

So how do you make this work portably?

There is no cout.close().  Should I use dup2 on the underlying fd?


More information about the Gcc mailing list