title: Inheritance and method overloading
body: <p>Why C++ compiler gives this error? Why i can access lol() from B, but can not access rofl() [without parameters]. Where is the catch?</p>
  
  <pre><code>class A
  {
  public:
     void lol(void) {}
     void rofl(void) { return rofl(0);}
     virtual void rofl(int x) {}
  };
  
  class B : public A
  {
  public:
     virtual void rofl(int x) {}
  };
  
  int _tmain(int argc, _TCHAR* argv[])
  {
      A a;
     a.lol();
     a.rofl(1);
     a.rofl();
  
     B  b;
     b.lol();
     b.rofl(1);    
     b.rofl(); //ERROR -&gt; B::rofl function does not take 0 arguments
  
  
     return 0;
  }
  </code></pre>