Home » C++ programming language

C++ polymorphism and its types

Learn: What is Polymorphism in C++ programming language, how many types of polymorphism C++ have?

Polymorphism is an important and basic concept of OOPS. Polymorphism specifies the ability to assume several forms. It allows routines to use variables of different types at different times.

In C++, An operator or function can be given different meanings or functions. Polymorphism refers to a single function or multi-functioning operator performing in different ways.

Types of polymorphism

There are two types of polymorphism in C++

  1. Static or Compile time polymorphism
  2. Dynamic or Run time polymorphism

1) Static or compile time polymorphism

In this type of polymorphism behavior of functions and operators decide at compile time. Thus, it is known as static or compile time polymorphism.

There are two types of static polymorphism:

2) Dynamic or run time polymorphism

Dynamic polymorphism is basically used for runtime time member function binding. Thus, it is known as dynamic polymorphism.

There are following types of dynamic polymorphism:

Was this page helpful? YES NO

Are you a blogger? Join our Blogging forum.

Comments and Discussions

© https://www.includehelp.com (2015-2018), Some rights reserved.

Like other websites, this site uses cookies to deliver relevant ads based on your interest, by using our website, you acknowledge that you have read our privacy policy.