title: Overloading virtual method in derived class with different signature
body: <p>Having</p>
  <ul>
  <li>a BASE class defining a virtual method</li>
  <li>a DERIVED class which defines a virtual method with the same name, but different signature</li>
  </ul>
  <p>the compiler complains that it cannot find the correct function in the BASE class when called from another class using a pointer to the DERIVED class.</p>
  <p><strong>Example (Constructors etc omitted):</strong></p>
  <pre><code>class BASE {
      public: virtual int print(std::vector&lt;double&gt;&amp; values);
  };
  
  int BASE::print(std::vector&lt;double&gt;&amp; values){
      std::cout &lt;&lt; &quot;This is the base class!&quot; &lt;&lt; std::endl;
  }
  </code></pre>
  <pre><code>class DERIVED : public BASE {
      public: void virtual print(int a, int b);
  };
  
  void DERIVED::print(int a, int b){
      std::cout &lt;&lt; &quot;This is the derived class from int-method!&quot; &lt;&lt; std::endl;
  }
  </code></pre>
  <pre><code>class TEST {
      public: void testit();
  };
  
  void TEST::testit(){
      DERIVED derived;
      std::vector&lt;double&gt; a;
      derived.print(a);
  }
  
  </code></pre>
  <p>The compiler complains with <code>TEST.cpp:30:17: error: no matching function for call to ‘DERIVED::print(std::vector&lt;double&gt;&amp;)</code></p>
  <p>What can I do to overload virtual functions with different signatures in derived classes? For example, this may be useful to add functionality that cannot be available in the BASE class.</p>