[转]可变参数的宏定义
#include<stdio.h>
#define LOG(format, ...) printf(""format"\n",##__VA_ARGS__)
int main()
{
LOG("%d %d %d",1,2,3);
return 0;
}
输出结果
$ 1 2 3
Related Issues not found
Please contact @VeitchKyrie to initialize the comment
#include<stdio.h>
#define LOG(format, ...) printf(""format"\n",##__VA_ARGS__)
int main()
{
LOG("%d %d %d",1,2,3);
return 0;
}
输出结果
$ 1 2 3
Related Issues not found
Please contact @VeitchKyrie to initialize the comment