title: Difference between vector::begin() and std::begin()
body: <p>While iterating over a vector in c++, I noticed there is a <code>begin()</code> function in the standard library, and also a <code>begin()</code> as a member function of the <code>vector</code> class. What, if any, is the difference between the two, and which should be used over the other?</p>
  
  <p>Example:</p>
  
  <pre><code>vector&lt;int&gt; numbers;
  //Code to put values in my vector
  for (vector&lt;int&gt;::iterator i = numbers.begin(); i &lt; numbers.end(); i++)
      cout &lt;&lt; *i &lt;&lt; '\n';
  </code></pre>
  
  <p>vs:</p>
  
  <pre><code>vector&lt;int&gt; numbers;
  //Code to put values in my vector
  for (vector&lt;int&gt;::iterator i = std::begin(numbers); i &lt; std::end(numbers); i++)
      cout &lt;&lt; *i &lt;&lt; '\n';
  </code></pre>