title: c++: instantiate object
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/11853700/c-object-instantiation-vs-assignment">C++ Object Instantiation vs Assignment</a>  </p>
  </blockquote>
  
  
  
  <p>I am quite new to C++ and was wondering what is the difference(if any) between instantiating an object as</p>
  
  <pre><code>int main () {
    vector&lt; int &gt; x(2);
  }
  </code></pre>
  
  <p>or </p>
  
  <pre><code>int main () {    
    vector&lt; int &gt; x = vector&lt; int &gt; (2); 
  }
  </code></pre>
  
  <p>except for the fact that the latter takes longer to write. Thanks in advance!</p>