Closed

Oct 30, 2014 at 7:31pm
Thanks that helped.
Last edited on Oct 30, 2014 at 8:25pm
Oct 30, 2014 at 8:06pm
You haven't defined any constructors that take an argument. Lines 59-63 all try to construct an object given at least 1 parameter, but none of your classes have any such constructor.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class PartTimeEmp : public Employee
{
    double wage;
	
public:
    //constructor using initialization list syntax
    PartTimeEmp(double w) : wage(w) {}

    void setWage(double w){wage = w;}

    virtual double pay()
    {
        double PartTimeEmp = wage * 40;
        return PartTimeEmp;
    }
};
Last edited on Oct 30, 2014 at 8:08pm
Topic archived. No new replies allowed.