Whenever a function is called, the function's arguments are
evaluated and copies of the resulting values are assigned to the
function's parameters. Then, the statements in the function's
body are evaluated. When a return statement is evaluated, the
argument of the return expression is evaluated, and that value
becomes the value of the function call.
When you define a function, C++ requires you to declare a
data type for each parameter and for the value that the function
returns.
If you want to define a function that does not return a value,
then supply void in place of an ordinary data-type declaration.
You can define many identically named functions, as long as
each of those identically named functions
has a unique pattern of parameter data types.
If you want to define your own function,
then instantiate the following pattern:
data typefunction name (data type 1parameter 1,
...,
data type lparameter l) {
declaration 1
...
declaration mstatement 1
...
statement n
}