I am dusting off my C++ learnings and trying to write a program here.
class Quad{
public:
Quad(){}
protected:
vec _topLeft, _topRight, _bottomLeft, _bottomRight;
};
class IrregularQuad : public Quad{
public:
IrregularQuad(vec topLeft, vec topRight, vec bottomLeft, vec bottomRight)
: _topLeft(topLeft), _topRight(topRight), _bottomLeft(bottomLeft), _bottomRight(bottomRight)
{}
};
I am getting a compile error on the above Dervied class contractor saying: Member initializer _topLeft does not name a non-static data memeber or base class (similar error for other members as well)
I can't get my head around what's going worng. Is it that I can't initialise protected members using Initalizer list or something?