CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Debugger

  1. #1
    Join Date
    Sep 2009
    Posts
    3

    Debugger

    I have the code:

    #ifndef MAXN
    #define MAXN 0
    #define MAXM 0
    #else
    #define MAXM 100
    #endif

    I would like to debugger this, something like:

    #ifndef MAXN // print out "MAXN is not defined"
    #define MAXN 0
    #define MAXM 0
    #else // print out "MAXN is defined"
    #define MAXM 100
    #endif

    How?

  2. #2
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: Debugger

    That isn't code, that's preprocessor statements. Debuggers can't get at them, they're gone before compiling begins.

    In fact that doesn't make sense----on either path you're multiply defining the symbol.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured