条件编译

#include <stdio.h>
#include <iostream>
#include <stdlib.h>

#define C 9

int main(){

#if C==10
    printf("c=10
");
#else
    printf("c!=10
");    
#endif
    getchar();
    return 0;
} 

结果 是 

c!=10

#include <stdio.h>
#include <iostream>
#include <stdlib.h>

#define C 10

int main(){

#if C==10
    printf("c=10
");
#else
    printf("c!=10
");    
#endif
    getchar();
    return 0;
} 
结果是
c=10


原文地址:https://www.cnblogs.com/letben/p/8460322.html