#include #include class wabbit { int x; public: wabbit(int initial_x): x(initial_x) { cout << "wabbit(" << x << ")\n"; } virtual void move() = 0; virtual int hungry() const = 0; }; class brownian: public virtual wabbit { public: brownian(int initial_x): wabbit(initial_x) { cout << "brownian(" << initial_x << ")\n"; } void move() {} }; class victim: public virtual wabbit { public: victim(int initial_x): wabbit(initial_x) { cout << "victim(" << initial_x << ")\n"; } int hungry() const {return 0;} }; class rabbit: public brownian, public victim { public: rabbit(int initial_x) : wabbit(initial_x), victim(initial_x), brownian(initial_x) { cout << "rabbit(" << initial_x << ")\n"; } }; class multiplying_rabbit: public rabbit { public: multiplying_rabbit(int initial_x) : wabbit(initial_x), rabbit(initial_x) { cout << "multiplying_rabbit(" << initial_x << ")\n"; } }; int main() { multiplying_rabbit mr(10); return EXIT_SUCCESS; }