title: Basic C++ inheritance challenged by my compiler?
body: <pre><code>#include &lt;iostream&gt;
  
  class Base
  {
  public:
      virtual void ok( float k ){ std::cout&lt;&lt; "ok..." &lt;&lt; k; }
      virtual float ok(){ std::cout&lt;&lt; "ok..."; return 42.0f; }
  };
  
  class Test : public Base
  {
  public:
      void ok( float k ) { std::cout&lt;&lt; "OK! " &lt;&lt; k; }
      //float ok() { std::cout &lt;&lt; "OK!"; return 42; }
  };
  
  int main()
  {
      Test test;
      float k= test.ok(); 
      return 0;
  }
  </code></pre>
  
  <p>Compilation under GCC 4.4 :</p>
  
  <pre><code>hello_world.cpp: In function `int main()`:
  hello_world.cpp:28: erreur: no matching function for call to `Test::ok()`
  hello_world.cpp:19: note: candidats sont: virtual void Test::ok(float)
  </code></pre>
  
  <p>I don't understand why <code>float ok()</code> defined in Base isn't accessible to Test user even if it does publicly inherit from it. I've tried using a pointer to the base class and it does compile. Uncommenting the Test implementation of <code>float ok()</code> works too.</p>
  
  <p>Is it a bug compiler? I'm suspecting a problem related to name masking but I'm not sure at all.</p>