[解决办法] 预编译的表达式和程序中使用的变量 i 没有关系. 在 #if 里面, 没有通过 #define 定义过的标示符被认为是 0, 定义过的被处理成非 0. MSDN: This constant expression is considered true (nonzero) if the identifier is currently defined; otherwise, the condition is false (0). An identifier defined as empty text is considered defined. [解决办法] #if i==0是成立的,这里i被预编译器看作是一个未定义的符号,而把它处理成0值。 [解决办法] 以下是预处理之后的结果。 预处理阶段的宏名i和编译阶段的变量名i没有任何关系。