Mega Code Archive
Categories
/
C
/
Macro Preprocessor
Use macro to build string
#include
#define MKSTRING(str) # str int main(void) { int value; value = 10; printf("%s is %d", MKSTRING(value), value); return 0; }