StringizeArgs


I can't quite come up with a use case for this, but I also didn't know it existed until this week.  The # symbol in a macro will convert an argument into a string.

 

Code:

#define Example(arg) if(arg==0) printf("Example: " #arg " equals zero\n");

 

Usage:

 

 


Extensions:

 


Sources:

http://c-faq.com/ansi/macstrexp.html

http://c-faq.com/ansi/stringize.html