You can begin coding your HelloWorld program. The .cpp file that you create will be saved in the project folder you just created Creating a Makefile project.
Files are edited in the C/C++ editor located to the right of the C/C++ Projects view. The left margin of the C/C++ editor, called the marker bar, displays icons for items such as bookmarks, breakpoints, and compiler errors and warnings.
For more information about:
To create a C++ file:
#include <iostream> using namespace std; int main () { // Say Hello five times for (int index = 0; index < 5; ++index) cout << "HelloWorld!" << endl; char input = 'i'; cout << "To exit, press 'm'" << endl; while(input != 'm') { cin >> input; cout << "You just entered " << input << " you need to enter m to exit." << endl; } exit(0); }
Your new .cpp file is displayed in the Project Explorer view. Your project now contains main.cpp. Before you can build your HelloWorld project, you must create a makefile.
CDT projects
Project file views
Coding aids
Working with C/C++ project files
Writing code