错误 C1022

应输入 #endif

#if#ifdef#ifndef 指令没有匹配的 #endif 指令。 确保每个 #if#ifdef#ifndef 都有一个相匹配的 #endif

以下示例生成 C1022:

// C1022.cpp
#define true 1

#if (true)
#else
#else    // C1022

可能的解决方法:

// C1022b.cpp
// compile with: /c
#define true 1

#if (true)
#else
#endif