Click here to Skip to main content
15,909,953 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
what is the value of that macro defined above

What I have tried:

I didn't get any result, Please help me
Posted

That statement is invalid, you cannot change the definition of a constant. I suspect you mean:
C++
#define a 1000

// now anywhere the compiler sees a it will replace it with 1000.
//
// e.g.

printf("The value of a is %d\n", a);

// will print
//    The value of a is 1000
 
Share this answer
 
#define is a preprocessor macro, e.g.

C++
#define a 1000


Now you can use "a" instead of 1000.
In your question you use it wrong, the compiler prints error E0040 "expected an identifier".
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900