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

#define TIME 5
int main()
int i=TIME;

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.