What's the exact step of macro expanding?

Viewed 2038

This doesn't work as expected:

#define stringify(x) #x  
printf("Error at line " stringify(__LINE__));

This works:

#define stringify1(x) #x  
#define stringify(x) stringify1(x)  
printf("Error at line " stringify(__LINE__));  

What's the priority that preprocess uses to expand such macros?

1 Answers
Related