Explaining the code

Preprocessor Directive
Used to include other peoples code before starting our own. It is instructing the compiler to copy the contents of the header file into our code before the rest is compiled.

Main Function
The Main function is essential to every C++ program, because it’s the starting point of every C++ program.

Expression Statements
Expressions Statements are expressions followed by a semicolon. Very common.

Declaration Statements
Declaration Statements are statements that declare something, could be a variable as an example.

Return Statement
Exits the program, and in this case with no error code.

Privacy & Terms