/**
*cppTest-2.3:预处理命令
*
*author 炜sama
*/
#include<iostream.h>
#include<stdio.h>
//1、输入的3个数据类型必须一样!2、返回的数据类型与输入的数据类型是一样的!
//宏名同样区分大小写
#define NUM(a,b,c) a##b##c
#define TEST
void main()
{
//int i[2]={1,2};
//cout<<sizeof(i)<<endl;
printf("%d\n",NUM(1,2,3));
printf("%s\n",NUM("1","2","3"));
#ifdef TEST
cout<<"TEST"<<endl;
#else
cout<<"no TEST"<<endl;
#endif
#ifndef TEST
cout<<"no TEST"<<endl;
#else
cout<<"TEST"<<endl;
#endif
}
cppTest-2.3:预处理命令
最新推荐文章于 2021-05-20 10:16:36 发布