I have a Regular
class. It has a setValue
method:
void Regular::setValue(string id, string name, double s, int n = 0)
{
uid = id;
uname = name;
sid = s;
netcount = n;
}
When I run the following code
Regular x;
x.setValue("X01", "John Doe", 1.1);
It gives me an error
'Regular::setValue': function does not take 3 arguments
Should it not set the value of netcount = 0
by default, because I didn't pass in the fourth argument?