title: How to override a pure virtual function using a subclass reference in the overriden function
body: <p>So I have a problem to override a pure virtual function in my derived class.
  The implementation and declaration of the classes looks like this:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>class Base{
  private:
     size_t id;
  public:
     virtual bool isEqual(const Base&amp; src) const =0;
  };
  
  class Derived: public Base{
  private:
      string str;
  public:
      virtual bool isEqual(const Derived&amp; src) const override
      {
          return (this-&gt;str == src.str);
      }
  };
  </code></pre>
  
  <p>so when I implement it like this it hits me with compiler error like</p>
  
  <pre><code>member function declared with 'override' does not override a base class member function
  </code></pre>
  
  <p>Could you plz tell me how I could get that right and maybe explain me why my version doesn't work. Thanks in advance!</p>