C++ Functions

As mentioned earlier, C++ allows “top-level” functions. These are not part of any class, and are called without the name of any object or class. Otherwise, the syntax is similar to what you're used to in Java.

By default, parameters are passed by value: the parameter is essentially a variable initialized to the value of the argument.