📜  c 从宏定义中获取字符串 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:24.095000             🧑  作者: Mango

代码示例1
#define xstr(s) str(s)
#define str(s) #s
#define foo 4
str (foo)
     → "foo"
xstr (foo)
     → xstr (4)
     → str (4)
     → "4"