Introduction to C++
You will need programmer tools for code editing. Visit Development tools.
The First Programβ
Once you have your editor ready, you can start writing your first program.
When learning a new programming language there is a tradition of starting with a program that writes "Hello, World!". Letβs do just that!
Create a project in your editor.
A file called main.cpp
main.cpp
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β
Copy the following code into your editor, compile it and then run it:
#include <iostream>
int main()
{
std::cout << "Hello, World!";
}
Hello, World!
You should see an output like the one above.
You will find an explanation of the above code in the next lesson. π