简体   繁体   English

Eclipse C ++默认的“ Hello World”错误

[英]Eclipse C++ default “Hello World” errors

This is my first post here, so sorry if it's a little bit bad :I but I have a problem. 这是我在这里的第一篇文章,很抱歉,如果它有点不好:我但是我有问题。 When I tried to make a Hello World C++ project in Eclipse (first time trying c++) I tried to build the project and run it, but it said that there are errors. 当我尝试在Eclipse中创建Hello World C ++项目时(首次尝试使用c ++),我试图构建该项目并运行它,但是它表示存在错误。 Here is the code: 这是代码:

#include <iostream>
using namespace std;

int main() {
    cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
    return 0;
}

And also here is a screenshot of the errors: 这也是错误的屏幕截图:

在此处输入图片说明

I tried looking but couldn't find a solution, so sorry if I look stupid for being a total noob :\\ All and any help is appreciated. 我尝试查找,但是找不到解决方案,所以如果我对成为一个完全菜鸟感到愚蠢,则表示抱歉:\\所有以及任何帮助,我们都感激不尽。 :) Thanks! :) 谢谢!

The code looks good to me. 该代码对我来说看起来不错。 I think you didn't setup C++ in Eclipse correctly. 我认为您没有在Eclipse中正确设置C ++。

Follow the step-by-step setup here . 按照此处的分步设置进行操作。 You should be able to work it out after correct setup. 正确设置后,您应该可以解决该问题。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM