I have a base class A and two classes B, C derived from A. Declaration of method func is given in class A. How can I define method func separately for B and C ?
class A {
public:
void func();
};
class B : public A {
//some members
};
class C : public A {
//some members
};
//define B's func here without changing the definition of the three classes
//define C's func here without changing the definition of the three classes