title: I am able to call a method w/o passing the required arguments in c++. How come?
body: <p>Here is the code...</p>
  
  <pre><code>#include "stdafx.h"
  #include&lt;iostream&gt;
  using namespace std;
  
  class Base
  {
  public:
      virtual void Display(bool b = false)
      {
          cout&lt;&lt;"Base"&lt;&lt;"\t"&lt;&lt;b&lt;&lt;endl;
      }
  };
  
  class Derived : public Base
  {
  public:
      virtual void Display(bool b) override
      {
          cout&lt;&lt;"Derived"&lt;&lt;"\t"&lt;&lt;b&lt;&lt;endl;
      }
  };
  
  int _tmain(int argc, _TCHAR* argv[])
  {
      Base* bp = new Base();
      Derived* dp = new Derived();
      bp-&gt;Display();
      dp-&gt;Display(true);
      bp = new Derived();
      bp-&gt;Display();
      cout&lt;&lt;"Done"&lt;&lt;endl;
      return 0;
  }
  </code></pre>
  
  <p>When the <code>Display()</code> method called second time using <code>bp</code>, surprisingly it hit the method in <code>Derived</code> class. in <code>Derived</code> class I didn't specify default argument. But it took the default base class argument. How?</p>