title: Does the vector.resize() method calls the default elements constructors when resizing?
body: <p>I am trying the following code:</p>
  
  <pre><code>struct _Struct2
  {
      void   *ptr;
      double dval;
  };
  
  struct _Struct
  {
      float fval;
      int   ival;
      std::vector&lt;_Struct2&gt;   data;
  };
  
  std::vector&lt;_Struct&gt;    vec;
  
  
  int main()
  {
      vec.resize( 9 );
      for ( int i = 0; i &lt; vec.size(); i++ )
      {
          _Struct &amp;elem = vec[i];
          int     len = elem.data.size(); // elem.data is [0]()
      }
  }
  </code></pre>
  
  <p>The resize(9) should allocate 9 elements of type _Struct. And, in fact it works. But every element of type _Struct is not initialized, especially the data element, which is another std::vector. I would like it to be initialized to the empty std::vector. Have to do that manually? I thought that the resize() method would have called the default constructor of every _Struct element.
  Thx</p>
  
  <p>Ps.
  The names of the structs used here are just the first things that come to my mind. This is just an example. My Visual Studio tells me that elem.data correspond, in the debug view, to <code>[0]()</code>.</p>
  
  <p>Ps.
  Forget the <code>[0]()</code>.</p>