int getValue(int);
double getValue(double);
int main()
{
int intnumber;
double doublenumber;
getValue(intnumber);
getValue(doublenumber);
cout << "Integer is : " << intnumber << endl;
cout << "floating point is: " << doublenumber << endl;
return 0;
}
int getValue(int inputValue)
{
cout << "Enter an integer: ";
cin >> inputValue;
return inputValue;
}
double getValue(double inputValue)
{
cout << "Enter a floating-point number: ";
cin >> inputValue;
return inputValue;
}
So Maybe im not understanding overloaded functions and their assigned variables to return. But shouldnt the return "inputvalue" define the variables intnumber and doublenumber?
Oh i just omitted those. apprently it does work, i dont know why but sometimes my projects return errors until i put them into a new source file and rerun.. anyone ever experience this?