This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

cout assign


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]