title: C++ remove_if on a vector of objects
body: <p>I have a vector (order is important) of objects (lets call them myobj class) where I'm trying to delete multiple objects at a time.</p>
  
  <pre><code>class vectorList
  {
  
      vector&lt;*myobj&gt; myList; 
  };
  
  class myobj
  {
  
      char* myName;
      int index;
      bool m_bMarkedDelete;
  }
  </code></pre>
  
  <p>I was thinking that the best way to do this would be to mark specific myobj objects for deletion and then call myList.remove_if() on the vector. However, I'm not exactly sure how to use predicates and such for this. Should I create a member variable in the object which allows me to say that I want to delete the myobj and then create a predicate which checks to see if the member variable was set?</p>
  
  <p>How do I implement the predicate as a part of the vectorList class?</p>