CodeClerks

Function Overloading in C++



Write the reason you're deleting this FAQ

Function Overloading in C++

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.
Using the concept of function overloading; we can design a family of functions with one function name but with different argument lists. The function would perform different operations depending on the argument list in the function call. The correct function to be invoked is determined by checking the number and type of the arguments but not on the function type.
Lets see an example of this....

int sum(int x,int y)
{
 cout

Comments

Please login or sign up to leave a comment

Join