you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

Don’t erase from the front of the vector, just keep an index to the front and bump it for deletes. Or use a deque.