Virtual base class
Inorder to understand the concept of virtual base class consider the following hybrid inheritance:

The child has two direct base classes – parent 1 and parent 2 which themselves have a common base class grandparent. The child inherits the traits of grandparent via two separate paths. All the public and protected members of grandparent are inherited into child twice, first via parent 1 and again via parent 2. This introduces ambiguity while accessing member inside child class and should be avoided. This can be solved by declaring the common base class as a virtual base class while declaring the direct base classes i.e. grand parent class should be declared as a virtual base class while declaring parent 1 and parent 2. Now only one copy of the members of grand parent will be inherited into child.
class A // grand parent
{
...
...
};
class B : public virtual A // parent 1
{
...
...
};
class C : public virtual A // parent 2
{
...
...
};
class D : public B, public C //child
{
//only one copy of the members of A will be inherited.
...
...
};
CACKLE comment system