title: Search for a struct item in a vector by member data
body: <p>I'm very new to c++ and I'm trying to find a way to search a vector of structs for a struct with a certain member data.</p>
  
  <p>I know this would work with simple types in the vector</p>
  
  <pre><code>std::find(vector.begin(), vector.end(), item) != vector.end()
  </code></pre>
  
  <p>But lets say I have a struct like this:</p>
  
  <pre><code>struct Friend
  {
    string name;
    string number;
    string ID;
  };
  </code></pre>
  
  <p>and a vector like this:</p>
  
  <pre><code>vector&lt;Friend&gt; friends;
  </code></pre>
  
  <p>Then the vector is filled with friends. </p>
  
  <p>Let's say I want to search for a friend with a certain ID, and cout the details. Or delete the certain struct from the vector. Is there a simple way to do this?</p>