Unit III - Function Overloading in C++
Unit III - Function Overloading in C++
If any class have multiple functions with same names but different parameters then they are
said to be overloaded. Function overloading allows you to use the same name for different
functions, to perform, either same or different functions in the same class.
Function overloading is usually used to enhance the readability of the program. If you have to
perform one single operation but with different number or types of arguments, then you can
simply overload the function.
30
60
int main()
{
sum (10,20);
sum(10.5,20.5);
}
30
31.0