title: Should I call the base class default constructor in the initialization list?
body: <pre><code>class A : public B
  {
    ...
  }
  
  // case I : explicitly call the base class default constructor
  A::A() : B()
  {
    ...
  }
  
  // case II : don't call the base class default constructor
  A::A() // : B()
  {
    ...
  }
  </code></pre>
  
  <p>Is the case II equal to case I?</p>
  
  <p>To me, I assume that the default constructor of base class B is NOT called in case II. However, despite still holding this assumption, I have run a test which proves otherwise:</p>
  
  <pre><code>class B
  {
  public:
      B()
      {
          cout &lt;&lt; "B constructor" &lt;&lt; endl;
      }
  };
  
  class A : public B
  {
  public:
      A()
      {
          cout &lt;&lt; "A constructor" &lt;&lt; endl;
      }
  };
  
  int _tmain(int argc, _TCHAR* argv[])
  {
      A a;
      return 0;
  }
  </code></pre>
  
  <p>// output from VS2008</p>
  
  <pre><code>B constructor
  A constructor
  Press any key to continue . . .
  </code></pre>