Skip to main content

Overriding Function

Body

Overriding function



In this part you will learn:
1. What are overriding functions?
2. What are the benefits of using overriding functions?
3. How to override a function
4. Program
5. Output

Overriding function
A function of base class defined again in the derived class is known as overriding function. In many c++ programs, there comes a case when we want to add extra functionality in the base class. So we override the function. In function overriding if the object is of base class then the member function of base class is called, if the object is of derived class then the member

Add new comment

Screenshot