title: overloading base class method in derived class
body: <p>I am trying to understand why the following code does not compile, apparently the solution relies in specifically declaring the dependency on method_A in the derived class.
  Please refer to the following code:</p>
  
  <pre><code>class Base
  {
    public:
  
      void method_A(int param, int param2)
      {
        std::cout &lt;&lt; "Base call A" &lt;&lt; std::endl;
      }
  
  };
  
  //does not compile
  class Derived : public Base
  {
    public:
  
      void method_A(int param)
      {
        std::cout &lt;&lt; "Derived call A" &lt;&lt; std::endl;
      }
  };
  
  //compiles
  class Derived2 : public Base
  {
    public:
      using Base::method_A; //compile
      void method_A(int param)
      {
        std::cout &lt;&lt; "Derived call A" &lt;&lt; std::endl;
      }
  };
  
  int main ()
  {
    Derived myDerived;
    myDerived.method_A(1);
    myDerived.method_A(1,2);
  
    Derived2 myDerived2;
    myDerived2.method_A(1);
    myDerived2.method_A(1,2);
    return 0;
  }
  </code></pre>
  
  <p>"test.cpp", (S) The wrong number of arguments have been specified for "Derived::method_A(int)".</p>
  
  <p>What is the technical reason that prevents the derived class to know its base class is implementing the method it's trying to overload?
  I am looking in understanding better how the compiler/linker behaves in this case.</p>