Possible Duplicate:
In C++, what is a virtual base class?
virtual inheritance
why is it so that the constructors of virtual base classes are called from most derived class...and in the inheritance hierarchy first the objects to virtual base classes are created...whats the logic behind this?
I understand that using virtual inheritance as in diamond structure using virtual inheritance only one copy of the most base class is created but what exactly is virtual doing in a linear inheritance.
class A{};
class B : virtual public A {};
class C : virtual public B {};
What actually we try to achieve on using this kind of inheritance?
Also what is the object layout in case of virtual inheritance ?
Can someone explain the logic behind this kind of behaviour in C++?