This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
freopen function
- To: <gcc at gcc dot gnu dot org>
- Subject: freopen function
- From: "Michael Nabarro" <michael at envisional dot com>
- Date: Thu, 20 Sep 2001 09:58:05 +0100
I'm trying to use freopen to redirect stdout to a file. This works fine but
I then want to redirect stdout back to the console and am having trouble
doing this. I have used the following two calls.
freopen("temp","w",stdout);
freopen("CON","w",stdout);
Apparently CON is meant to be the console but instead a file called CON is
created.
I'd greatly appreciate any suggestions.
Thanks
Michael