Function Overloading in C++

  In C++  language, we can use create a more than one function with same name but each function must have different parameter list.

Such functions are called overloaded function and this process is known as function overloading.

Function overloading is an example of polymorphism.

Polymorphism means one function having many forms .   

Example of function overloading:

Output

Description: In the above program, we have created a three function with same name “show” but each show() function have a different parameter list

Que. Write a C++ program to calculate the area of rectangle , triangle and circle using function overloading .

Output

Function Overloading in Classes

Output

Categories C++