c++ - Erase range from a std::vector? -


If there are 100 elements in my std :: vector , and I only have the first 10 and the rest Erase, is there an easy way to do this?

  vec.resize (10); // drops of the rest (the ability is the same)    

Comments