#define TAG_LYK_TEST "this_class_LykTest"
#define LOGEM_LYK_TEST(format,...) \
printf(format, TAG_LYK_TEST": Function:%s, :Line:%d\n", ##__VA_ARGS__, \
FUNCTION, LINE)
#include
int main(){
char s[] = "abcd";
LOGEM_LYK_TEST("printf a string :%s", s);
return 0;
}
这段代码打印出的结果是:
printf a string :this_class_LykTest: Function:%s, :Line:%d
哪位好心的大佬给分析分析,这里的%s和%d为什么没有被__Function__和__LINE__替换掉????