title: Confused about virtual overloaded functions
body: <p>I am confused about compiler errors regarding the code below:</p>
  
  <pre><code>class Base {
  public:
    virtual ~Base () { }
    virtual void func () { }
    virtual void func (int) { }
    virtual void another () { }
    virtual void another (int) { }
  };
  
  class Derived : public Base {
  public:
    void func () { }
  };
  
  int main () {
    Derived d;
    d.func();
    d.func(0);
    d.another();
    d.another(0);
  }
  </code></pre>
  
  <p>Using gcc 4.6.3, the above code causes an error at d.func(0) saying that Dervied::func(int) is undefined.</p>
  
  <p>When I also add a definition for func(int) to Derived, then it works. It also works (as in the case of "another") when I define neither func() nor func(int) in Derived.</p>
  
  <p>Clearly there is some rule going on here regarding virtual overloaded functions, but this is the first time I've encountered it, and I don't quite understand it. Can somebody tell me what exactly is going on here?</p>