Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Thanks, but it seems to not do anything, after getting the size of the vector before and after erase, it is the same Commented May 7, 2020 at 11:59
  • Please make sure that you are using the function size() instead of capacity() otherwise it should work unless the second_parameter is off limits of vector. Commented May 7, 2020 at 14:58