C++ Multimaps
Syntax:
The function begin() returns an iterator to the first element in the multimap.
Syntax:
The clear() function deletes all elements from the multimap.
Syntax:
size_type count( const key_type &key );
|
The function count() returns the number of occurrences of key in the multimap.
Syntax:
The function empty() returns true if the multimap is empty, and
false otherwise.
Syntax:
The end() function returns an iterator to the end of the multimap.
Syntax:
pair equal_range( const key_type &key );
|
The function equal_range() returns two iterators - one to the first element that contains
key, another to the last element that contains key.
Syntax:
The erase function() either erases the element at pos, erases the elements between
start and end, or erases all elements that have the value of key.
Syntax:
The find() function returns an iterator to key, or an iterator to the end of the
multimap if key is not found.
Syntax:
allocator_type get_allocator();
|
The get_allocator() function returns the allocator of the multimap.
Syntax:
The function insert() either:
- inserts val after the element at pos, and returns an iterator to that element.
- inserts a range of elements from start to end.
- inserts val, but only if val doesn't already exist. The return value is an
iterator to the element inserted, and a boolean describing whether an insertion took place.
Syntax:
The function key_comp() returns the function that compares keys.
Syntax:
iterator lower_bound( const key_type &key );
|
The lower_bound() function returns an iterator to the first element which has a value greater
than or equal to key.
Syntax:
The function max_size() returns the maximum number of elements that the multimap can hold.
Syntax:
The rbegin() function returns a reverse iterator to the end of the multimap.
Syntax:
The function rend() returns a reverse iterator to the start of the multimap.
Syntax:
The function size() returns the number of elements currently in the multimap.
Syntax:
void swap( multimap &obj );
|
The swap() function exchanges the elements in obj with those in the current multimap.
Syntax:
iterator upper_bound( const key_type &key );
|
The function upper_bound() returns an iterator to the first element in the multimap with a
key greater than key.
Syntax:
value_compare value_comp();
|
The value_comp() function returns the function that compares values.