How calculate sum of values in std::vector<int>
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3221812/sum-of-elements-in-a-stdvector">sum of elements in a <code>std::vector</code></a>  </p>
</blockquote>



<p>I have std::vector and i want to calculate the sum of all the values in that vector.
Is there any built in function or i need to write my custom code?</p>
