title: Why does an overridden function in the derived class hide other overloads of the base class?
body: <p>Consider the code : </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  class Base {
  public: 
      virtual void gogo(int a){
          printf(" Base :: gogo (int) \n");
      };
  
      virtual void gogo(int* a){
          printf(" Base :: gogo (int*) \n");
      };
  };
  
  class Derived : public Base{
  public:
      virtual void gogo(int* a){
          printf(" Derived :: gogo (int*) \n");
      };
  };
  
  int main(){
      Derived obj;
      obj.gogo(7);
  }
  </code></pre>
  
  <p>Got this error :</p>
  
  <pre>
  >g++ -pedantic -Os test.cpp -o test
  test.cpp: In function `int main()':
  test.cpp:31: error: no matching function for call to `Derived::gogo(int)'
  test.cpp:21: note: candidates are: virtual void Derived::gogo(int*) 
  test.cpp:33:2: warning: no newline at end of file
  >Exit code: 1
  </pre>
  
  <p>Here,  the Derived class's  function is eclipsing all functions of same name (not signature)  in the base class. Somehow, this behaviour of C++ does not look OK. Not polymorphic.</p>