#include <multimap>
template < class Key,
class Type,
class Traits=less<Key>,
class Allocator=allocator<pair <const Key, Type>> > class multimap
Parameters
Key -The key data type.
Type - Element data type.
Traits - Function to compare two element values, argument is optional(default, binary predicate less).
Allocator - Memory allocator/deallocator, optional.
Constructors
multimap( );
explicit multimap( const Traits& comp );
explicit multimap( const Traits& comp, const Allocator& aloc );
map( const multimap& src );
template<class InputIterator>
multimap( InputIterator start, InputIterator end );
template<class InputIterator>
multimap( InputIterator start, InputIterator end, const Traits& comp );
template<class InputIterator>
multimap( InputIterator start, InputIterator end, const Traits& comp, const Allocator& aloc );
Parameters
aloc - Allocator class
comp - Comparison function used to order the elements, defaults is hash_compare.
src - Source multimap to be copied
start - First element in the range
end - Last element in the range
Methods
| begin() | Returns a random-access iterator to the first element in the container. |
| clear() | Remove all elements. |
| count() | Returns a count of elements with a matching parameter-specified key. |
| empty() | Check if container is empty. |
| end() | Returns a random-access iterator that points just beyond the end of the container. |
| equal_range() | Returns an iterator that addresses the location succeeding the last element in a map. |
| erase() | Removes an element or a range of elements from the specified positions. |
| find() | Returns an iterator to the element with the specified key. |
| get_allocator() | Returns the allocator object. |
| insert() | Inserts element or a number of elements at the specified position. |
| key_comp() | Get a copy of the comparison object for ordering keys. |
| lower_bound() | Get iterator to the first element with a key value that is equal to or greater than the specified key. |
| max_size() | Get the maximum length. |
| rbegin() | Get reverse iterator to the first element. |
| rend() | Get reverse iterator to the end element. |
| size() | Get the count of elements. |
| swap() | Swap elements between two vectors. |
| upper_bound() | Get iterator to the first element with a key value that is greater than the specified key. |
| value_comp() | Get a copy of the comparison object. |
Usage
STL Home
Copyright © 2007 Rajinder Yadav, All rights reserved
|