2009-10-26c语言日记(预处理)

来源:互联网 发布:陶瓷 知乎 编辑:程序博客网 时间:2024/05/07 17:17

 

2009-10-26

 

const int LIM = 50;
const int LIM2 = 2 * LIM;/*error*/
const int LIM2 = 2 * LIMIT;
0 不是字符'0',而是ascii码表中的'/0',也就是字符串结束符。
/*#x字符串化*/

#ifdef MAVIS
 #include "horse.h"
 #define STABLES 5
#else
 #include "cow.h"
 #define STABLES 15
#endif

 

ifndef SIZE//如果没定义SIZE
 #define SIZE 100
#endif

#if SYS == 1
 #include "ipmpc.h"
#elif SYS == 2
 #include "vax.h"
#elif SYS == 3
 #include "mac.h"
#else
 #include "general.h"
#endif

原创粉丝点击