0

I tried to debug Macro variable but i cannot. I use Dev c++

#include<stdio.h>
#define TIME 5
int main()
{
int i=TIME;
printf("%d",i);
}

when I run it, of course it gives correct result.
but when I debug, it reports "TIME = not found in current context"

2
Contributors
1
Reply
3
Views
6 Years
Discussion Span
Last Post by Adak
0

TIME is not a variable, TIME is being replaced by the pre-processor, by the digit 5. So the compiler never see's TIME, and knows nothing about it.

You see the results of this 1) because the program is correct and 2) because the program will compile.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.