In this program, the declaration of the
main
function is presented, which takes no arguments. The curly brackets reflect grouping in C++ and in this case show the body of the
main
function. That is, the beginning of the main function is the opening parenthesis, and the end of the main function is the closing parenthesis. A double slash shows the beginning of the comment. Comments are ignored by the compiler and serve to refine the information in the code.

Each program written in C++ has the function
main()
, with which the program starts. The
main()
function, as a rule, returns the result of its execution, which is indicated by the
int
(integer)
data type
written before the
main()
function. If the function is successful, the
main()
function returns
0
as the result. The value of the result, other than zero, signals an abnormal termination of the program.

The value returned by the program upon completion can be used in the operating system for service purposes.