#include #include #include #include using namespace std;int main( ){ const char* word[] = { "A", "B", "C", "D","E" }; const char* clue[] = { "a", "b","c", "d","e" }; map dictionary1; transform( word, word+sizeof(word)/sizeof(word[0]), clue,inserter( dictionary1, dictionary1.end() ),make_pair ); typedef multimap Dictionary; Dictionary dictionary2( dictionary1.begin(),dictionary1.end() ); dictionary2.insert( make_pair( "POPS", "Bursts" ) ); dictionary2.insert( make_pair( "POPS", "Fathers" ) ); dictionary2.insert( make_pair( "ADAM", "Madam" ) ); pair range = dictionary2.equal_range( "POPS" ); for( Dictionary::iterator i = range.first; i != range.second; ++i ) cout << "\nPOPS - " << i->second; for( Dictionary::iterator i = dictionary2.begin(); i != dictionary2.end(); ++i ) cout << i->first << " - " << i->second << endl;}