The First Program

The execution of a program always starts with the function main. Below is a program that prints the text Hello, World! on the screen.

#include <iostream>
using namespace std;

void main()
{
  cout << "Hello, World!" << endl;
}