Possible Duplicate:
Returning multiple values from a C++ function
/************************************************/
/* Name: premserv */
/* Description: Calculations for premium serv */
/* Parameters: N/A */
/* Return Value: premserv */
/************************************************/
float premserv ()
{
int daymin = 0; //Var for day minutes
int nightmin = 0; //Var for night minutes
float daytotal = 0; //Var for day total
float nighttotal = 0; //Var for night total
float premserv = 0; //Var for premium service cost
cout << "\n" << "Please enter the number of minutes used durring the day (6AM - 6PM): " << "\n";
cin >> daymin;
cout << "\n" << "Please enter the number of minutes used durring the night (6PM - 6AM): " << "\n";
cin >> nightmin;
daytotal = (daymin - 75) * 0.1;
nighttotal = (nightmin - 100) * 0.05;
premserv = 25 + daytotal + nighttotal;
return premserv;
}
I need to get the values from daymin, nightmin, and premserv out of the function. I only know how to get 1 value out of a function.