title: std::vector, constructors, objects
body: <p>The folowing constructor</p>
  
  <pre><code> std::vector&lt;Object&gt; objects(n);
  </code></pre>
  
  <p>creates n objects calling the default constructor, i.e. something like that:</p>
  
  <pre><code>std::vector &lt;Object&gt; objects;
  for (unsigned int i = 0; i &lt; n; i++) objects.push_back(o);
  </code></pre>
  
  <p>Is this procedure also valid for dynamically allocated objects? Does the construction</p>
  
  <pre><code>std::vector&lt;Object *&gt; objects(n);
  </code></pre>
  
  <p>represent this functionality?</p>
  
  <pre><code>std::vector &lt;Object*&gt; objects;
  for (unsigned int i = 0; i &lt; n; i++) objects.push_back(new Object());
  </code></pre>
  
  <p>If not, is there a way how to arrange it?</p>