i am going over my old exams to study for finals and have noticed some stuff I still do not understand.
class Shape
{
private:
int center_x, int center_y;
public:
Shape (int x, int y) : center_x(x), center_y(y); {} //constructor initializer
}
class Rectangle : public Shape
{
private:
int length, width;
public:
Rectangle(): //this is where i have trouble, I am supposed to fill in missing code here
//but shape does not have a default constructor, what am i supposed to fill in here?
Rectangle (int x, int y, int l, int w) : Shape(x,y);{length = l; width = w;}
}
Thanks