## 23.5 Maps (cont.)

- Set that maintains a collection of `pair`s (chptr. 22)
- Insert key/value pairs
- Iterators return `pair`s:

  >     map<string, int> database;
  >     . . .
  >     map<string, int>::iterator current = database.begin();
  >     while (current != database.end())
  >     {
  >        pair<string, int> element = *current;
  >        cout << "key is " << element.first << " value is " <<
  >           element.second << "\n";
  >        ++current;
  >     }

prev |top |next