In my below code, I have this error msg saying : no instance of constructor matches the argument list.
Can anyone shed some light to this issue?
thanks!
class WeeklySales {
char* salesPerson;
double* amount;
int noOfWeek;
Use [code][/code] tags,
passing a string literal to a char pointer is supposedly deprecated, use std::string as opposed to char * (though char * still seems to work, it is still likely better to use std::string),
when you construct the object, you pass 50 (an int) to a parameter of type double *. Also, amount is a pointer to a double too, did you mean to make it just a double (an the parameter in your constructor too)?
You should use constchar*, but that isn't the problem. The problem is the constructor takes a pointer to double as the second argument and you're feeding it an int literal. Chances are you don't actually want a pointer to double. Just use double as the data type for amount.