this error
QUOTE
error C2661: 'addcharges' : no overloaded function takes 4 parameters
is coming up because of this piece of code
CODE
double addcharges (double rate, int days, double charges, double medcharges)
{
return (rate * days) + charges + medcharges;
}
at the top of this source file you have two prototypes for the function
addcharges. neither of those prototypes takes 4 parameters,
CODE
double addcharges(int, double);
double addcharges(double);
however you define the function to take 4 parameters later in the program. also,
these errors:
QUOTE
error C2601: 'addcharges' : local function definitions are illegal
error C2601: 'addcharges' : local function definitions are illegal
are because you are defining a function within another function,
main no function can contain the definition of another function, therefore you must either define these before or after
main, not within.