Question

I wanted to write 'hello world' in eclipse c++, but it does not work

table

I go to Run configurations, what config options for c++ programs should i give?

I know I don't care about 'debug' - only 'release', but how to do that?

u

Was it helpful?

Solution

Here is what I did: File->New->C++ Project You will get a pop up window. Type the name of the project you want. Then, below it says executable and inside this folder, I have (by default I guess) Empty Project. Then click Next and Finish.

Now the project appears in the left column of Eclipse. I right click it and select New->File and name it main.cpp

The main window of Eclipse opens the file main.cpp and I write inside:

#include <iostream>

int main() {
std::cout << "Hello Erjan\n" << std::endl;
return 0;
}

Then I click on Build, it's the hammer icon in the middle of the toolbar. The code compiles and we are ready to launch it!

So, click on Run icon (3 positions right of the Build icon) and you should see the output in the console.

OTHER TIPS

The first step, create new project and try proper toolchains. Second step, Project >> build project. Third step, right click on new executive file and run or debug it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top