3.2 Overloading

Overloading is the definitions of multiple subroutines or methods using the same name. However, each method has a different combination of parameters. Assume class X and Y are not related, then the following function prototypes are examples of overloading:

 
X somefunction(const X &a, const X &b); 
Y somefunction(const Y &a, const Y &b);

The compiler selects the correct function to use based on the arguments of an invocation.