Stringtify Arguments of C Macro
We can use #
inside a macro to stringtify argument to macros.
For example,
#define STRINGIZE(x) #x
const char* str = STRINGIZE(12);
generates
const char* str = "12";
Created: May 30, 2023Last Modified: Mar 14, 2024
We can use #
inside a macro to stringtify argument to macros.
For example,
#define STRINGIZE(x) #x
const char* str = STRINGIZE(12);
generates
const char* str = "12";