I have something like that (simplified) class A { public: virtual void Function () = 0; }; class B { public: virtual void Function () = 0;
#include <iostream> using namespace std; class A{ public: void eat(){ cout<&开发者_高级运维lt;\"A\";} };
class A{ public: void eat(){ cout<<\"A\";} }; class B: virtual public A{ public: void eat(){ cout<<\"B\";} };
Is there a way to define a class Foo in C++ so that I can inherit from it I can\'t \"diamond 开发者_高级运维inherit\" from it
Wikipedia on the diamond problem: \"... the diamond problem is an ambiguity that arises when two classes B and C inherit from A, and class D inherits from both B and C. If a method in D calls a metho