There is such a simple code:
#include <stdio.h> class B{ private: int j;//если у класса не будет переменных, то "this B" бует равен "this A" public: B(){ printf("this B=%d\n",(int)this); } }; class A:public virtual B{ public: A(){ printf("this A=%d\n",(int)this); } }; int main(){ A*a=new A(); delete a; } </code>
Result of performance:
this B=147431436 this A=147431432
the result shows that this for class B is NOT the same as this for class A. If inheritance is NOT virtual, then the addresses will match. Also, if there are no parameters in class B, then the addresses will also match.
But now an example (with virtual inheritance and parameters) and addresses do not match. Is it possible to somehow get a pointer to object A from class B? those. it is necessary that class B explicitly knows the address of the entire instance, the successor of which it is