deciphering vtable dumps
问题 I am "playing" with virtual inheritance in C++, and I want to know how a class object is laid out. I have those three classes: class A { private: int a; public: A() {this->a = 47;} virtual void setInt(int x) {this->a = x;} virtual int getInt() {return this->a;} ~A() {this->a = 0;} }; class B { private: int b; public: B() {b = 48;} virtual void setInt(int x) {this->b = x;} virtual int getInt() {return this->b;} ~B() {b = 0;} }; class C : public A, public B { private: int c; public: C() {c = 49