嚴重錯誤 C1018
未預期的 #elif
#elif
指示詞出現在 #if
、 #ifdef
或 #ifndef
建構外部。 請僅在其中一個建構內使用 #elif
。
下列範例會產生 C1018:
// C1018.cpp
#elif // C1018
#endif
int main() {}
可能的解決方式:
// C1018b.cpp
#if 1
#elif
#endif
int main() {}
意見反映
https://aka.ms/ContentUserFeedback。
即將推出:我們會在 2024 年淘汰 GitHub 問題,並以全新的意見反應系統取代並作為內容意見反應的渠道。 如需更多資訊,請參閱:提交及檢視以下的意見反映: