This a capability in which a C++ program can have several functions performing similar tasks on different data types. When an overloaded function is called, C++ selects the proper function by examining the
number, types and order of the arguments in the call.
Overloaded functions are distinguished by their signatures. A signature is a combination of function's name, and its parameter types.
The compiler encodes each function identifier with the number and types of its parameters to enable type safe linkage. Type safe linkage ensures that the proper overloaded function is called and the arguments conform to the parameters.
Creating overloaded functions with identical parameter list but different return types is a syntax error.
Write a C++ program that uses overloaded functions to find squares of both an integer and double numeric values.
using namespace std;
int square (int num)
double square (double num)
int main ()
cout<<"Enter an integer number"<
cout<<"Enter a floating point number"<>number2;
cout<<"The square of the integer number is: "
cout<<"The square of the floating number is: "