My instructor gave us a review for a test we have tomorrow and I'm looking at a problem and it doesn't make sense.. Can someone let me know what they think? The only thing that doesn't look right is that it doesn't have any parameters that its taking in...? Isn't that the only thing wrong?
The question says:
"Find as many errors as you can in the following overloaded function definitions."
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;
}