69,369
社区成员
发帖
与我相关
我的任务
分享
#define interface IMyNewInterface
// 你可以看看 C 语言如何定义接口,就知道了。
#endif#include <stdio.h>
int main()
{
#define interface 1
#ifdef interface
printf("%d\n", interface);
#undef interface
//printf("%d\n", interface); // 这句话加上会报错 因为interface的定义被取消了
#endif
getchar();
return 0;
}
#undef 的作用就是取消先前的定义