QUESTION
How do I convert a constant passed to a #define macro into a text string?
ANSWER
Pass the parameter to a stringizing macro as shown below:
#define NUMBER B85800 // this can be...
Type: Posts; User: octangle
QUESTION
How do I convert a constant passed to a #define macro into a text string?
ANSWER
Pass the parameter to a stringizing macro as shown below:
#define NUMBER B85800 // this can be...
What you've offered will produce the following:
"X" (the name of the #define) not "ABC" (the value of the #define)...
I want the value contained within X to be stringized
I want to print the contents of a VC Preprocessor Definition (essentially a #define set by the IDE - such as X=ABC).
When I do the following:
printf("%s", X);
I get the compiler error:
...