Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在 Windows 7 中使用 Eclipse 创建我的第一个 C++ 可执行程序。
#include <stdio.h> int main( int argc, const char* argv[] ) { printf( "arg" ); }
我收到错误:
“‘printf’这个词拼写不正确”。
以下是我的配置。如何克服这个错误?
似乎您没有为您的 C++ 源代码提供一个被识别为标准 C++ 文件扩展名的扩展名。
您能否将文件重命名为main.cpp以便 eclipse 相应地处理它?
您可以尝试使用程序更改文件的扩展名。正如我所看到的,它目前只是 Main (没有任何扩展名),eclipse 将它视为一个简单的文本文件,从而执行拼写检查。如果将其更改为 Main.c 或 Main.cpp,一切都应该没问题。