title: Interface Inheritance in C++
body: <p>I have the following class structure:</p>
  
  <pre><code>class InterfaceA
  { 
     virtual void methodA =0;
  }
  
  class ClassA : public InterfaceA
  {
     void methodA();
  }
  
  class InterfaceB : public InterfaceA
  {
     virtual void methodB =0;
  }
  
  class ClassAB : public ClassA, public InterfaceB
  { 
     void methodB(); 
  }
  </code></pre>
  
  <p>Now the following code is not compilable:</p>
  
  <pre><code>int main()
  {
      InterfaceB* test = new ClassAB();
      test-&gt;methodA();
  }
  </code></pre>
  
  <p>The compiler says that the method <code>methodA()</code> is virtual and not implemented. I thought that it is implemented in <code>ClassA</code> (which implements the <code>InterfaceA</code>).
  Does anyone know where my fault is?</p>