Re: Use trace macro
From: CheckAbdoul (checkabdoul)
Date: 06/28/04
- Next message: Arnaud Debaene: "Re: LogonUser"
- Previous message: Gabi: "LogonUser"
- In reply to: pat: "Re: Use trace macro"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 28 Jun 2004 10:02:02 -0400
TRACE is a MFC macro. You can try using OutputDebugString() API if you
do not want to include MFC.
--
Cheers
Check Abdoul [VC++ MVP]
-----------------------------------
"pat" <pat@pattern.com> wrote in message
news:u%23da0X6WEHA.2840@TK2MSFTNGP11.phx.gbl...
> John Smith <js@127.0.0.1> wrote in message
> news:MwaDc.2558$4r7.1596@newssvr27.news.prodigy.com...
> > "pat" <pat@pattern.com> wrote in message
> > news:up6eOEzWEHA.3284@TK2MSFTNGP12.phx.gbl...
> > > how to use trace macro in win32 console application? Thanks!
> > >
> > > "trace("this is tracing");" gives error:
> > >
> > > error C3861: 'trace': identifier not found, even with
argument-dependent
> > > lookup
> >
> > Usualy, help file is helpful in such matters:
> > To display messages from your program in the debugger Output window, you
> can
> > use the ATLTRACE macro or the MFC TRACE macro. Like assertions, the
trace
> > macros are active only in the Debug version of your program and
disappear
> > when compiled in the Release version.
> >
> > The following examples show some of the ways you can use the TRACE
macro.
> > Like printf, the TRACE macro can handle a number of arguments.
> >
> > int x = 1;
> > int y = 16;
> > float z = 32.0;
> > TRACE( "This is a TRACE statement\n" );
> >
> > TRACE( "The value of x is %d\n", x );
> >
> > TRACE( "x = %d and y = %d\n", x, y );
> >
> > TRACE( "x = %d and y = %x and z = %f\n", x, y, z );For important
> information
> > on the TRACE macro, see Diagnostic Services.
> >
> >
> Thanks for the reminding!
>
> I did try TRACE but it didn't work either. Like I said it is in a console
> application...Must be a header file missing to be included but which one?
>
>
- Next message: Arnaud Debaene: "Re: LogonUser"
- Previous message: Gabi: "LogonUser"
- In reply to: pat: "Re: Use trace macro"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|