title: A vector holds class objects, The class object contains 3 strings per object. How do i find the specific string, then delete the entire element?
body: <p>I have a class that contains 3 elements for example {first_name, Last_name, Phone}</p>
  
  <p>I have a vector that holds this set of information. In what manner could I go about looking for a single element of the set, for example find(last_name), and delete all elements that contain that specific last name? </p>
  
  <p>I've tried many examples and have searched far and wide throughout the world wide google. Please help. Attached is bits of code: </p>
  
  <pre><code>int number = 4;
  vector &lt;Friend&gt; BlackBook(number);
  
  Friend a("John", "Nash", "4155555555");
  Friend d("Homer", "Simpson", "2064375555");
  
  BlackBook[0] = a;
  BlackBook[1] = d;
  </code></pre>
  
  <p>Now that's just same basic code for the set up. Here's a couple of things i've tried. But the more I look at what the code says, the more it seems as if it's not allowing for a string argument... but then i don't know how to give a class arguement with respect to a specific string... well I don't know what i'm doing wrong. I have a feeling I could do this with pointers, but the whole pointer thing isn't clicking yet. But heres some things i've tried. </p>
  
  <pre><code>vector &lt;Friend&gt; :: iterator frienddlt;
  frienddlt = find (BlackBook.begin(), BlackBook.end(), nofriend);
  if (frienddlt != BlackBook.end())
  {
      BlackBook.erase( std::remove( BlackBook.begin(), BlackBook.end(), nofriend), BlackBook.end() );
  }
  else
  {
      cout &lt;&lt; nofriend &lt;&lt;" was not found\n" &lt;&lt; "Please Reenter Last Name:\t\t";
  }
  </code></pre>
  
  <p>When I compile the project the header file stl_algo.h opens and points to line 1133. 
  Any Help would be much appreciated!! thank you! </p>