freopen()

Discussion in 'C Programming' started by Teh Charleh, Dec 7, 2003.

  1. Teh Charleh

    Teh Charleh Guest

    After I have redirected output to a file (james.txt)...

    freopen("james.txt", "w", stdout);

    after the prog has written what needs to be written to the file how do I direct
    output back to the monitor?

    Thanks :)
    Teh Charleh, Dec 7, 2003
    #1
    1. Advertising

  2. Teh Charleh wrote:
    > After I have redirected output to a file (james.txt)...
    >
    > freopen("james.txt", "w", stdout);
    >
    > after the prog has written what needs to be written to the file how do I direct
    > output back to the monitor?


    This is a FAQ.

    http://www.eskimo.com/~scs/C-faq/q12.34.html

    --
    Enrico `Trippo' Porreca
    Enrico `Trippo' Porreca, Dec 7, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex Vinokur

    freopen & cout

    Alex Vinokur, Dec 2, 2003, in forum: C++
    Replies:
    1
    Views:
    1,192
    Jack Klein
    Dec 3, 2003
  2. Alex Vinokur

    freopen, fclose and stdout

    Alex Vinokur, Dec 3, 2003, in forum: C Programming
    Replies:
    4
    Views:
    8,361
    vidyaani
    Jan 11, 2013
  3. John Devereux

    freopen()

    John Devereux, Sep 27, 2005, in forum: C Programming
    Replies:
    3
    Views:
    502
    John Devereux
    Sep 27, 2005
  4. tmpfile and freopen

    , Jun 5, 2006, in forum: C Programming
    Replies:
    1
    Views:
    365
    Barry Schwarz
    Jun 15, 2006
  5. freopen

    , Aug 18, 2007, in forum: C Programming
    Replies:
    4
    Views:
    755
Loading...

Share This Page