分享方式:


編譯器錯誤 C2006

'directive' 必須是檔案名,找到 'token'

#include 或 #import 指示詞需要檔案名。 若要解決錯誤,請確定 Token 是有效的檔案名。 此外,請將檔案名放在雙引號或角括弧中。

下列範例會產生 C2006:

// C2006.cpp
#include stdio.h   // C2006

可能的解決方式:

// C2006b.cpp
// compile with: /c
#include <stdio.h>