Do these two vector initializations accomplish the same result?
<p>Are these effectively doing the same thing?</p>

<pre><code>vector&lt;MyType&gt; stuff;
MyClass(MyType *things, int numThings){
    for (int i = 0; i &lt; numThings; ++i){
        //stuff[i] = things[i]; //original version of question, fixed
         stuff.push_back(things[i]);
    }
}
</code></pre>

<p>vs.</p>

<pre><code>vector&lt;MyType&gt; stuff;
MyClass(MyType *things, int numThings) : stuff(things, things+numThings) {}//fixed
</code></pre>

<p>If they are, any more or less overhead using either approach? (except for the additional typing in method 1)</p>
