CPP Programming
About Lesson

Polymorphism is one of the features of Object Oriented Programming Language.  Polymorphism means having many forms.  Polymorphism in C++ can be achieved in two ways:

  1. Compile Time
    1. Function Overloading
    2. Operator overloading
  2. Run Time
    1. Function overriding
    2. Virtual functions

Difference between Compile time and Run-time Polymorphismre

Compile Time Polymorphism: This has the name as it is known to the compiler what implementation of a function can be used at the time of compiling.  It is also known as early or static binding or static linking.

Run Time Polymorphism: Here the implantation of function would be decided at the time of running program.  It is also known as late or dynamic binding.

In this chapter, we are focusing on Compile Time Polymorphism.  We will discuss about Runtime polymorphism later.

You cannot copy content of this page