freopen & cout
Tue Dec 2 18:48:00 GMT 2003
According to MSDN:
"The freopen function closes the file currently associated with stream
and reassigns stream to the file specified by path."
That probably means that the original stdout (to which cout writes) has
been closed, and so your cout output is getting lost in the big void...
I know that you were probably expecting cout to get redirected to the
file, but perhaps this just isn't the right way to do it (due to how
cout is implemented in C++, etc.)...
From: email@example.com [mailto:firstname.lastname@example.org] On
Behalf Of Alex Vinokur
Where has output-to-cout gone in the program below?
More information about the Gcc-help