预编译条件的简单使用

#include <stdio.h>

#define YEARS_OLD

#ifdef YEARS_OLD

void say()
{
printf("say say say say.... hello world..");
}

#endif // DEBUG


int main()
{
#ifdef YEARS_OLD
say();
#endif // !A
printf("hello world..");
return 0;
}

posted @ 2023-10-26 00:10  MaxBruce  阅读(11)  评论(0)    收藏  举报