This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: freopen & cout
- From: lrtaylor at micron dot com
- To: <alexvn at connect dot to>, <gcc-help at gcc dot gnu dot org>
- Date: Tue, 2 Dec 2003 11:37:04 -0700
- Subject: RE: freopen & cout
Alex,
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.)...
Good luck,
Lyle
-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of Alex Vinokur
Hi,
Where has output-to-cout gone in the program below?