How to compile C++ source by Eclipse

It is recomended to store sources related to separate binary targets to separete directories.
Namely a directory called "HelloWorld" is assigned to our HolloWorld program.

Select File/New/Project...

Select Managed Make C++ Project

Press Next
Enter Project name , e.g., HelloWorldBin

Press Next
Select Executable

Press Finish
Open C/C++ Perspective

Clic on HelloWorldBin project with the 2nd (right) mouse button and select new source file

Enter a name with extension .cpp, e.g., main.cpp

Press Finish
Type main.cpp in

Press Save button on the taskbar

Press Run button on the taskbar

In Run dialog press New

Press Search Project...

Select HelloWorldBin executable

Press OK
Press Run