标签:
编译之前的处理指令
1 //Like static constant 2 #define NUM 6 3 4 //The truth of macro define is replacing the constant 5 //Replace "sum(a, b)" with "a+b" 6 #define sum(a, b) a+b
1 #define NUM 1 2 3 int main(int argc, const char * argv[]) { 4 5 #if NUM == 0 6 printf("0"); 7 #elif NUM > 0 8 printf(">0"); 9 #elif NUM < 0 10 printf("<0"); 11 #endif 12 13 printf("\n"); 14 return 0; 15 }
标签:
原文地址:http://www.cnblogs.com/wvqusrtg/p/4500755.html