August 2012
Intermediate to advanced
976 pages
30h 17m
English
The associative containers define three versions of erase, which are described in Table 11.5. As with the sequential containers, we can erase one element or a range of elements by passing erase an iterator or an iterator pair. These versions of erase are similar to the corresponding operations on sequential containers: The indicated element(s) are removed and the function returns void.
Table 11.5. Removing Elements from an Associative Container
The associative containers supply an additional erase operation that takes a key_type argument. This version removes all the elements, if any, with the given key and returns a ...
Read now
Unlock full access