Note that the function-type has been given as void, this
tells the compiler that this function does not return any value.
Because the function does not take any parameters the
parameter-list is empty, this is indicated by the voidparameter-list. No local variables are required by this
function and the function implementation only requires the sending of
three successive end of line characters to the output stream
cout. Note the introductory comment that describes what the
function does. All functions should include this information as minimal
comment.

Since this function does not return a value it cannot be used in an
expression and is called by treating it as a statement as
follows:

skipthree();

Even though there are no parameters the empty parameter list ()must be inserted.

When a function is called the C++ compiler must insert appropriate
instructions into the object code to arrange to pass the actual
parameter values to the function code and to obtain any values
returned by the function. To do this correctly the compiler must know
the types of all parameters and the type of any return value. Thus
before processing the call of a function it must already know how the
function is defined. This can be done by defining any functions that
are used in the main program before the main program, for example the
function
skipthree could be incorporated in a program as follows:

The main program tends to convey much more information of use in
understanding the program than do individual functions. So it is
better if the main program comes first. However this means that the
compiler meets the call of a function before it meets the definition
of the function.

If using functions from a library of functions then the main program
is linked with the pre-compiled object code of the functions. Thus
while compiling the main program on its own the compiler has no
knowledge of the function definitions.

The way round both the problems above is to use Function
prototypes. A function prototype supplies information about the
return type of a function and the types of its parameters. This
function prototype is then placed before the main program that uses
the function. The full function definition is then placed after the
main program or may be contained in a separate file that is compiled
separately and linked to the main program later. The function
prototype is merely a copy of the function heading. Thus the function
prototype for the function skipthree is:

In fact when using functions from the stream libraries and the
mathematical libraries prototypes are required for these functions.
This is handled by including the files iostream.h and
math.h which, among other things, contain the function
prototypes.