title: C++ error: cannot declare field to be of abstract type
body: <p>This is the situation:</p>
  
  <pre><code>class Base {  
      virtual void methodA() = 0;  
      virtual void methodB() = 0;  
  };
  
  class Base_A : public Base {  
      void methodA(); 
      void methodB();  
  };
  
  class Base_B : public Base {  
      void methodA();  
      void methodB();  
  };
  
  class MyClass {
      private:  
          Base * b;   
  };  
  </code></pre>
  
  <p>When I compile it gives the error message:</p>
  
  <p><code>
  error: cannot declare field MyClass::b to be of abstract type because the following  virtual functions are pure within Base:<br>
      Base::methodA()<br>
      Base::methodB()
  </code></p>
  
  <p>How to solve this?</p>
  
  <p><strong>UPDATE</strong>
  It compiles now. I dont'know what I have changed</p>