#include <iostream>
#include <string>
#include <map>
#include <stdlib.h>
using namespace std;
int main()
{
map<string, string> dict;
dict["mouse"] = "squeek";
dict["cat"] = "meow";
dict["dog"] = "woof";
dict["bird"] = "tweet";
dict["snake"] = "sssss";
map<string, string>::iterator i = dict.begin();
for(; i != dict.end(); ++i)
cout << i->first << ": " << i->second << endl;
}
Textbook: pp. 386—395
[more info]