title: Is it valid to have a constructor call another constructor of the same class in its initialization list?
body: <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  
  class Data
  {
      private:
      int day, month, year;
      public:
      Data() : Data(0,0,0) {};
      Data(int d, int m, int y) : day(d) , month(m), year(y) {}
      void print() { std::cout &lt;&lt; day &lt;&lt; " " &lt;&lt; month &lt;&lt; " "&lt;&lt; year &lt;&lt; std::endl; }
  };
  
  int main()
  {
      Data a;
      a.print(); //ok - output: 0,0,0 and no compiler errors
  }
  </code></pre>
  
  <p>A constructor does not have a returning value, and a constructor is called when an object is created, meaning the data can be initialized, so when I call a constructor from another constructor, is this completely valid?</p>
  
  <p>I've also noticed that <code>Data() { Data(0,0,0); };</code> does <strong>NOT</strong> initialize the current class data members. </p>
  
  <p>Why is it that <code>Data() : Data(0,0,0) {};</code> works and <code>Data() { Data(0,0,0); };</code> does not?</p>