Types of Function Overriding in C++
Unlike other languages such as Java where function overriding is strictly done at compile time, C++ supports two types of function overriding:
- Compile Time Overriding
- Runtime Function Overriding
Function Overriding in C++
A function is a block of statements that together performs a specific task by taking some input and producing a particular output. Function overriding in C++ is termed as the redefinition of base class function in its derived class with the same signature i.e. return type and parameters. It can be of both type: Compile Time and Runtime Polymorphism.