Output to be redirected from console to file..

Discussion in 'C++' started by iceColdFire, May 12, 2005.

  1. iceColdFire

    iceColdFire Guest

    HI,

    I have an MFC application...I have used Memory Leak functions, as

    CMemoryState a,b;

    Now, a.DumpStatistics() send all its output to the console.... I need
    to get this output into a file...

    kindly suggest...

    I have alreay tried freopen(..) and ofstream type...but nothing seems
    to work...

    thanks
    a.a.cpp
    iceColdFire, May 12, 2005
    #1
    1. Advertising

  2. iceColdFire

    Howard Guest

    "iceColdFire" <> wrote in message
    news:...
    > HI,
    >
    > I have an MFC application...I have used Memory Leak functions, as
    >
    > CMemoryState a,b;
    >
    > Now, a.DumpStatistics() send all its output to the console.... I need
    > to get this output into a file...
    >
    > kindly suggest...
    >
    > I have alreay tried freopen(..) and ofstream type...but nothing seems
    > to work...
    >


    Well, MFC stuff should be directed to an mfc newsgroup, since it's their
    software. But assuming they're just using cout, it may be possible to use
    something like cout.rdbuf() to redirect it elsewhere. (I just saw that in
    another post, and don't know the details of it, so you need to look it up or
    Google for it to get better info.)

    -Howard
    Howard, May 12, 2005
    #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. Replies:
    8
    Views:
    5,596
  2. torlissa
    Replies:
    4
    Views:
    403
    Michel
    Nov 13, 2003
  3. pratap
    Replies:
    3
    Views:
    453
    James Kanze
    Jul 19, 2007
  4. Replies:
    5
    Views:
    3,423
    James Kanze
    Mar 4, 2008
  5. Replies:
    5
    Views:
    198
Loading...

Share This Page