In this case the function that we are using
from input output stream header file is the cout function. I will talk more
about this function later on. The line "void main(int)" is the main
function. All C++ program must have a main function or the program will not
compile an exe file. The syntax for a function definition is return-type
followed by the function-name and its parameters in curved
brackets. A the end of each line of code in a C or C++ program you have
to put a semi-colon to indicated that this is the end. See example below:
return type Function-name (parameter);
The curly brackets holds the body of every
function and it will not work without it. If you try to compile without a return
type, function name, parameter, or curly brackets you will get a compiler
error. The cout function takes a string as its parameter with the insertion
operator. The insertion operator tell the compiler to create a pointer for that
will be accepted by the cout function. The cout function then print to the
screen the string that the pointer points to in memory. The return function with
a parameter zero exits the main function and returns control to the operating
system.