title: C++ member function virtual override and overload at the same time
body: <p>If I have a code like this:</p>
  
  <pre><code>struct A {
    virtual void f(int) {}
    virtual void f(void*) {}
  };
  
  struct B : public A {
    void f(int) {}
  };
  
  struct C : public B {
    void f(void*) {}
  };
  
  
  int main() {
    C c;
    c.f(1);
  
    return 0;
  }
  </code></pre>
  
  <p>I get an error that says that I am trying to do an invalid conversion from int to void*. Why can't compiler figure out that he has to call B::f, since both functions are declared as virtual?</p>
  
  <hr>
  
  <p>After reading jalf's answer I went and reduced it even further. This one does not work as well. Not very intuitive.</p>
  
  <pre><code>struct A {
    virtual void f(int) {}
  };
  
  struct B : public A {
    void f(void*) {}
  };
  
  
  int main() {
    B b;
    b.f(1);
  
    return 0;
  }
  </code></pre>