C++ Polymorphism - Compile Time Polymorphism

Опубликовано: 06 Август 2026
на канале: Tx Rx
13
1

The word polymorphism means having many forms. In simple words, we can define polymorphism as the ability of a message to be displayed in more than one form. A real-life example of polymorphism, a person at the same time can have different characteristics. Like a man at the same time is a father, a husband, an employee. So the same person posses different behavior in different situations. This is called polymorphism. Polymorphism is considered one of the important features of Object-Oriented Programming.

In C++ polymorphism is mainly divided into two types:

Compile-time Polymorphism
Runtime Polymorphism