Skip to main content

Introduction to C++

Before you start

You will need programmer tools for code editing.

Visit Development tools.

The First Program​

Once you have your code editor ready, you can start writing your first program.

When learning a new programming language, the first thing you do is a simple application that displays the following text: "Hello, World!".

After creating the project, in your environment, a file with the extension .cpp has probably been automatically added. Most often it is called main.cpp (sometimes Source.cpp or ProjectName.cpp). If there is none, create one and name it main.cpp.

New files

If you don't know how to add a file to your project, see the tools section and find a tutorial for an editor of your choice.

We will save all our code in this file for now.

Application code​

Paste the following code and run it:

#include <iostream>

int main()
std::cout << "Hello, World!";
Result (console)
Hello, World!

You should see an output like the one above.

You will find an explanation of the above code in the next lesson. 🙂