title: about virtual base class and virtual inheritance in C++
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2126522/gcc-c-virtual-inheritance-problem">gcc c++ virtual inheritance problem</a>  </p>
  </blockquote>
  
  
  
  <p>Hi All,
         I am reading Effective C++ by scott myers books. It was mentioned about virtual base class and virtual inheritance as follows.</p>
  
  <blockquote>
    <p>The rules governing the initialization of virtual base classes are more complicated and less intuitive than are those for non-virtual bases. The responsobility for initializing a virtual base is borne by the most derived class in the hierarchy. When a new derived class is added to the hierarchy, it must assume initialization responsiblities for its virtual bases (both direct and indirect)</p>
  </blockquote>
  
  <p>Question is in above statement what are the rules for initialization of virtual base calsses and what are the responsiblities that derivied class has to take as mentioned in above text. Kindly request to explain with example.</p>
  
  <p>Thanks!</p>