title: c++ initialized specified for non-virtual method
body: <p>I have a.h as shown below</p>
  
  <pre><code>class A
  {
  public:
      void doSomething()=0;
  };
  </code></pre>
  
  <p>Then i have b.h as shown below</p>
  
  <pre><code>#include "a.h"
  
  class b: public A
  {
  public:
      void doSomething();
  };
  </code></pre>
  
  <p>I am just trying to check for syntax errors by trying to compile headers such as 
  <code>g++ -c a.h b.h</code></p>
  
  <p>and i get below errror</p>
  
  <p><code>a.h:4: error: initializer specified for non-virtual method 'void A::doSomething()'</code></p>
  
  <p>What does this error means?</p>