title: what is the best way to print all the elements of a vector in C++?
body: <p>What is the most efficient way to code "print all the elements of a vector to standard out" in C++, </p>
  
  <pre><code>for(std::vector&lt;int&gt;::iterator it = intVect.begin(); it != intVect.end(); ++i)
  std::cout &lt;&lt; *it;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>std::copy(intVect.begin(), intVect.end(), std::ostream_iterator&lt;int&gt;(std::cout));
  </code></pre>
  
  <p>and why?</p>