更新时间:2023-09-06 07:55:04
您能知道它的编译时间,通过简单地改变你的宏:
You can know it compile time, by simply changing your macro to:
#define STORE_STRING(X) store_string("" X, sizeof(X))
用法:
char a[] = "abcd", *p;
STORE_STRING(a); // error
STORE_STRING(p); // error
STORE_STRING("abcd"); // ok