&引用;“主要”的多重定义;在eclipse中(c语言) #包括 int main() { 无法

&引用;“主要”的多重定义;在eclipse中(c语言) #包括 int main() { 无法,c,C,检查您的工作目录中是否有其他源文件-其中可能还包含main方法。项目中是否有其他源文件可能包含main()?很可能您有多个带有main()的源文件在路径中-检查如何在Eclipse中定义和使用构建配置来切换main() #include <stdio.h> int main() { cout << "hello world"; return 0; }

检查您的工作目录中是否有其他源文件-其中可能还包含main方法。

项目中是否有其他源文件可能包含
main()
?很可能您有多个带有
main()的源文件
在路径中-检查如何在Eclipse中定义和使用构建配置来切换
main()
#include <stdio.h>

int main()
{
    cout << "hello world";
    return 0;
}