title: Check std::vector has duplicates
body: <p>I want to check if a vector of integers has any duplicates or not, and have to return true if it does. So I try to do something like this:</p>
  
  <pre><code>vector&lt;int&gt; uGuess = {1,2,3,3,4,5}
  vector&lt;int&gt; a = uGuess;
  sort(a.begin(), a.end());
  bool d = unique(a.begin(), a.end());
  </code></pre>
  
  <p>And this will not work since unqiue cannot be assigned as a bool value.
  How should I proceed towards this?
  If I were to write a for loop to perform the same action, how should I do that?</p>