Your First C++ Program
Let's get our hands dirty working on a "Hello, World!" program in C++.
“Hello, World!” program
Below is the source code for your first C++ program. First, have a look at the code, then we will discuss it.
Press the RUN button and see the output!
Press + to interact
C++
#include <iostream>using namespace std;int main() {cout << "Hello, World!";}
When we run the code above, it prints Hello, World!
on the console. It means we can modify this code to print anything on the console. Sounds interesting!
Explanation
The highlighted lines in the above program will appear in every C++ program. We will cover ...