#includeusing namespace std;//虚函数和析构函数需要定义,否则//a missing vtable usually means the first //non-inline virtual member function has no definition.class a{ virtual void func(){};public: virtual ~a()=default;//析构函数需要为public}aObj;class b :public virtual a{ virtual void foo(){};public: virtual ~b()=default;}bObj;class ax{ virtual void func(){}; char x;public: virtual ~ax()=default;}axObj;class bx:public virtual ax{ virtual void foo(){};public: virtual ~bx()=default;}bxObj;class c{ virtual void func(){};public: virtual ~c()=default;}cObj;class d :public c{ virtual void foo(){};public: virtual ~d()=default;}dObj;class cx{ virtual void func(){};public: virtual ~cx()=default; char x;}cxObj;class dx:public cx{ virtual void foo(){};public: virtual ~dx()=default;}dxObj;int main(){ cout<<"aObj "< <