This is the situation:
class Base {
virtual void methodA() = 0;
virtual void methodB() = 0;
};
class Base_A : public Base {
void methodA();
void methodB();
};
class Base_B : public Base {
void methodA();
void methodB();
};
class MyClass {
private:
Base * b;
};
When I compile it gives the error message:
error: cannot declare field MyClass::b to be of abstract type because the following virtual functions are pure within Base:
Base::methodA()
Base::methodB()
How to solve this?
UPDATE It compiles now. I dont'know what I have changed