Polymorphism & Virtual Functions

This chapter introduces the concept of polymorphism and virtual functions, and their use in inheritance

Definitions #

  • A virtual function is a member function which is declared in the base class using the keyword virtual and is re-defined (Overriden) by the derived class.

  • The term Polymorphism means the ability to take many forms. It occurs if there is a hierarchy of classes which are all related to each other by inheritance.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy