简体   繁体   中英

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. 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.

Follow the step-by-step setup here . You should be able to work it out after correct setup.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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