#define TRACE(arg1,...) char* arg1;
int main(void)
{
int a=4;
TRACE(("Hello",a)); // convert "Hello" to a valid char variable name.
return 0;
}
I'm having trouble in converting the string "Hello" into a variable name.
for example: "Hello" should be converted as const char* Hello; by using a macro. Since there are double quotes I'm unable to convert it. This is my first question in Stack Overflow.
TRACE(Hello)?TRACEhas exactly one macro argument:arg1is bound to("Hello",a).#define SMM_TRACE(x) printf x#define SMM_TRACE_CONVERT SMM_TRACE(CONVERT_ERROR_KEY_FAILED)int main(){int num = 1;SMM_TRACE(("the number is %d\n", num));printf("%s","SMM_TRACE_CONVERT\n");return 0;}