This topic is now archived and is closed to further replies.

This topic is 5537 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Array based containers including string, vector, and deque, require the erase() algorithm to permanently remove an element from the container. Understand that remove() will move one or more elements around thus making the user thinks that it has removed an element. In reality, it justed moved the element around and overrite the element''s position with a different value.

In summation, use erase() to permanently remove an element from an array-based STL container.


Share this post

Link to post
Share on other sites