title: C++ erasing part of the end of a vector without reallocation
body: <p>Looking through the C++ vector documents, pop_back() is a function that will not cause a reallocation of the vector's data. However, this only works for removing one member of the vector. I am trying to find a way to erase multiple members from the end of a vector. Originally I thought I would call pop_back() in a small for loop but I was wandering if there was a more convenient function that would do this for me?</p>
  
  <p>Edit:
  The <a href="http://www.cplusplus.com/reference/vector/vector/erase/" rel="nofollow">Cplusplus vector erase() reference</a> is not as clear as it should be as pointed out by juanchopanza. It is why I originally discarded using erase(). Erase afterall, works well.</p>