Polymorphism is one of the essential features of object-oriented programming that allows the class object to behave differently at different times. The word polymorphism is derived from a combination of greek word poly + morphs where poly means many and morphs means forms. In other words, we can say that one which takes many forms.

Polymorphism in C++

Polymorphism is a programming feature of OOPs that allows the object to behave differently in different conditions.  C++ has two types of polymorphism:

  1. Compile-time Polymorphism – This is also known as static (or early) binding.
  2. Runtime Polymorphism – This is also known as dynamic (or late) binding.

See the following figure.

Polymorphism in C++

#c++ #c++ polymorphism #programming

Polymorphism in C++ Example | C++ Polymorphism Tutorial
3.40 GEEK