class A {
public:
virtualvoid message1() const = 0;
virtualvoid message2() const { //show message };
};
and I have three derived classes (B : public A, C: public A, D: public A), where both B and C have the same message1() implementation, and D has an unique implementation of message1().
All three share the same message2() implementation.
Is there a way I can implement B and C message1() only once using inheritance?