C++ Language/Std/Stl/Algorithms/Modifying/Removing

From Wikibooks, open books for an open world
< C++ Language‎ | Std‎ | Stl‎ | Algorithms‎ | Modifying
Jump to navigation Jump to search

The std::remove() algorithm doesn't actually remove any items. Instead, it shifts the items-to-be-removed to the end of the collection. You need to call the collection class' item-removal function in order to complete the removal process.

Additional information about algorithms for the removal of items