title: How does vtable handle multiple inheritance?
body: <p>I understand that for single inheritance a pointer to a virtual function table is added to determine what parent class functions to call at runtime.</p>
  
  <pre><code>class Genius {
      int IQ;
  public:
      virtual void brag();
  };
  
  class Me : public Genius {
      int age;
  };
  </code></pre>
  
  <p>When instantiated, the memory layout of <code>Me</code> should look something like</p>
  
  <pre><code>  pointer to Genius vtable
    int iq
    int age
  </code></pre>
  
  <p>But what happens in the case of multiple inheritance?</p>
  
  <pre><code>// Assume CoolDude has virtual functions as well
  class Me : public Genius, public CoolDude {
      int age;
  };
  </code></pre>
  
  <p>What does the memory layout of the <code>Me</code> class look like now? How is multiple inheritance handled?    </p>