Posts

Showing posts with the label erase

How to Permanently Remove Items in STL Containers

Image
remove - What is does and does not do Like all STL algorithms, remove receives a pair of iterators to identify the range of container elements over which it needs to operate, as shown in its declaration: [code language="cpp"] template< class ForwardIterator, class T > ForwardIterator remove( ForwardIterator first, ForwardIterator last, const T& value ); [/code]