C++: Basic Concepts: Hello, World!: Your First C++ Program

Your First C++ Program
A C++ program is a collection of commands or statements.

Below is a simple code that prints "Hello world!" as its output. Try It Yourself
 * #include
 * using namespace std;
 * int main
 * cout << "Hello World!";
 * return 0;
 * }
 * return 0;
 * }

Sololearn is needed for this wiki because if I hadn't used sololearn, then you wouldn't be able to test this code.

Let's break down the parts of the code.


 * 1) include

C++ offers various headers, each of which contains information needed for programs to work properly. This particular program calls for the header  . The number sign (#) at the beginning of a line targets the compiler's pre-processor. In this case,#include tells the pre-processor to include the   header.

Note: The   header defines the standard stream objects that input and output data.