Output values using MFC to replace "cout" command available for Win32 console - Programmer

This is a discussion on Output values using MFC to replace "cout" command available for Win32 console - Programmer ; Hello, I'm stongly in need of your help. Here is my problem: I have always been using Win32 console application for programming in C/C++. Whenever I needed to check a variable value, I could just use the command "cout". However, ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Output values using MFC to replace "cout" command available for Win32 console

  1. Output values using MFC to replace "cout" command available for Win32 console

    Hello,

    I'm stongly in need of your help.
    Here is my problem:
    I have always been using Win32 console application for programming in
    C/C++. Whenever I needed to check a variable value, I could just use
    the command "cout". However, I'm using now an MFC application. When the
    program is running, I need to output some values.
    What would be most appropriate way to output values?
    Hopefully, I ve been clear enough! I've just spent all the day looking
    for a solution to replace "cout" (Win32 console) in a dialog based MFC
    application.

    Thanks a LOT for your help.

    Mido


  2. Re: Output values using MFC to replace "cout" command available forWin32 console

    Mido wrote:
    > Hello,
    >
    > I'm stongly in need of your help.
    > Here is my problem:
    > I have always been using Win32 console application for programming in
    > C/C++. Whenever I needed to check a variable value, I could just use
    > the command "cout". However, I'm using now an MFC application. When the
    > program is running, I need to output some values.
    > What would be most appropriate way to output values?
    > Hopefully, I ve been clear enough! I've just spent all the day looking
    > for a solution to replace "cout" (Win32 console) in a dialog based MFC
    > application.
    >
    > Thanks a LOT for your help.
    >
    > Mido
    >


    If you want to output for debugging purposes then use TRACE.

    TRACE("value is %d\n", i);

    The output will appear in the debugger output window. TRACE statements
    disappear in a release build.

    --
    Scott McPhillips [VC++ MVP]


  3. Re: Output values using MFC to replace "cout" command available for Win32 console

    Scott,

    That was exactly what I needed!!
    Thanks. Thanks. Thanks!!!!

    Mido

    Scott McPhillips [MVP] a écrit :
    > Mido wrote:
    > > Hello,
    > >
    > > I'm stongly in need of your help.
    > > Here is my problem:
    > > I have always been using Win32 console application for programming in
    > > C/C++. Whenever I needed to check a variable value, I could just use
    > > the command "cout". However, I'm using now an MFC application. When the
    > > program is running, I need to output some values.
    > > What would be most appropriate way to output values?
    > > Hopefully, I ve been clear enough! I've just spent all the day looking
    > > for a solution to replace "cout" (Win32 console) in a dialog based MFC
    > > application.
    > >
    > > Thanks a LOT for your help.
    > >
    > > Mido
    > >

    >
    > If you want to output for debugging purposes then use TRACE.
    >
    > TRACE("value is %d\n", i);
    >
    > The output will appear in the debugger output window. TRACE statements
    > disappear in a release build.
    >
    > --
    > Scott McPhillips [VC++ MVP]



+ Reply to Thread