To get a better understanding of how the code works, we will first implement the complete program and afterwards we will go through it step by step. Code Block |
---|
language | cpp |
---|
title | Hello World |
---|
| #include <iostream>
using namespace std;
int main() {
cout << "Hello World!";
return 0;
} |
Alright, time to take a deeper look at the code. The first line is Code Block |
---|
| #include <iostream> |
In C++, much like in Python, we have to include libraries (headers) to perform certian actions, e.g. writing to file or solving math equations. iostream is the standard input/output streams library that enables us to print to the screen (or e.g. a file). |