×

C++ Tutorial

C++ Data types

C++ Operators & Keywords

C++ Conditional Statements

C++ Functions

C++ 'this' Pointer, References

C++ Class & Objects

C++ Constructors & Destructors

C++ Operator overloading

C++ 11 (Advance C++)

C++ Preparation

C++ Header Files & Functionsr

Data Structure with C++

C++ - Miscellaneous

C++ Programs

C++ polymorphism and its types

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

What is C++ Polymorphism?

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 C++ 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:

Related Tutorials

Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.