title: Why do I get an error when using std::find() on a vector?
body: <p>I'm trying to use the <code>std::find()</code> function on a <code>std::vector</code>. Why does this code bring up an error, and how can I fix this?</p>
  
  <pre><code>struct person_id{
      int p_id;
  };
  std::vector&lt;person_id&gt; people;
  
  person_id tmp_person;
  tmp_person.p_id = 5;
  people.push_back(tmp_person);
  
  if(std::find(people.begin(), people.end(), 5) != people.end()) {
      cout&lt;&lt;"Contain"&lt;&lt;endl;
  } else {
      cout&lt;&lt;"Not Contain"&lt;&lt;endl;           
  }
  </code></pre>