Compile Time Polymorphism in C++ | types of polymorphism | what is compiled time polymorphism | Types of compiled time polymorphism


COMPILE TIME POLYMORPHISM

Compile time polymorphism is a type of polymorphism. Compile time polymorphism is also known as static binding, early binding and overloading as well. In a compile time polymorphism, method to be called is decided at compile time only and, Call is resolved by the compiler. Overloading is an example of compile time polymorphism.

COMPILE TIME POLYMORPHISM



{tocify} $title={Table of Contents}
Overloading is divided into two type:-


1). Operator overloading:-

                                           In C++ an operator is a symbol that tells the compiler to perform specific task. Every operator have their own functionality to work with data types. Class is user-defined data type so, compiler doesn't understand, how to use operators with user-defined data types. To use operators with user-defined data types, they need to be overload according to a programmer's requirement Read more


2).Function overloading:-

                                              overloading refers to the use of the same thing for different purposes. C++ also permits overloading of functions. This means that we can use the same function name to create functions that perform a variety of different tasks. This is known as function polymorphism in oop Read more




Data science & data analyst

C++

Algorithms

Technology


Post a Comment

Ask any query by comments

Previous Post Next Post