//条件编译实现debug调试版和high高级版的产品代码
#include <stdio.h>
#define LOG(s) printf("[%s:%d] %s\n",__FILE__,__LINE__,s)
#define HIGH
int main()
{
LOG("enter main...");
printf("1.Query Information\n");
printf("2.Record Information\n");
printf("3.Delete Information\n");
#ifdef DEBUG
{
printf("4.Exit\n");
}
#endif
#ifdef HIGH
{
printf("4.High Level Query\n");
printf("5.Mannul Service\n");
printf("6.Exit\n");
}
#endif
LOG("exit main...");
return 0;
}
条件编译#ifdef
最新推荐文章于 2024-04-18 08:52:46 发布