- Encapsulation and Extensibility of Types
- Virtual Functions
- Static Members of a Class
- Function templates
- Class templates
- Abstract Classes
Within one class it is possible to define two or more methods that use the same name, but have different numbers of parameters. When this occurs, methods are called overloaded and such a process is referred to as method overloading.
If the called function has no exact match, the compiler searches for a suitable function on three levels sequentially:
- search within class methods.
- search within the base class methods, consistently from the nearest ancestor to the very first.
- search among other functions.
If there is no exact correspondence at all levels, but several suitable functions at different levels have been found, the function found at the least level is used. Within one level, there can't be more than one suitable function.