=====equal_range===== Syntax: #include pair equal_range( const key_type& key ); pair equal_range( const key_type& key ) const; The function equal_range() returns two iterators - one to the first element that contains key, another to a point just after the last element that contains key. For example, here is a hypothetical input-configuration loader using multimaps, strings and equal_range(): multimap > input_config; // read configuration from file "input.conf" to input_config readConfigFile( input_config, "input.conf" ); pair >::iterator,multimap >::iterator> ii; multimap >::iterator i; ii = input_config.equal_range("key"); // keyboard key-bindings // we can iterate over a range just like with begin() and end() for( i = ii.first; i != ii.second; ++i ) { // add a key binding with this key and output bindkey(i->second.first, i->second.second); } ii = input_config.equal_range("joyb"); // joystick button key-bindings for( i = ii.first; i != ii.second; ++i ) { // add a key binding with this joystick button and output bindjoyb(i->second.first, i->second.second); }