I noticed that yes that important thing is parameters which matters in overloading..
btw these two are overloading functions, what other errors are there? I am baffled! someone help me...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
int getValue()
{
int inputValue;
cout << " Enter an integer: ";
cin >> inputValue;
return inputValue;
}
double getValue()
{
double inputValue;
cout << " Enter a float point value: ";
cin >> inputValue;
return inputValue;
}
Overloaded functions are distinguished by their parameters, not their return types.
You two functions have identical parameter signatures ().
You should get a linker error indicating duplicate functions.