C语言 ------ #undef 的使用

#undef 是在后面取消以前定义的宏定义   
该指令的形式为   
#undef 标识符   
其中,标识符是一个宏名称。如果标识符当前没有被定义成一个宏名称,那么就会忽略该指令。   
一旦定义预处理器标识符,它将保持已定义状态且在作用域内,直到程序结束或者使用#undef 指令取消定义。

#include <stdio.h>  
#include <stdlib.h>  
  
#define Max 5  
#undef Max  
int main()  
{  
    printf("Max is:%d
",Max);//Max is not defined  
    return 0;  
}  
原文地址:https://www.cnblogs.com/god-of-death/p/7898825.html