CIS 29 - Notes for Tuesday, 3/2

Announcements and Reminders


Recording

Standard Template Library Continued

The set container

  • associative container
  • elements are unique
  • elements stored in sorted order
  • requires <set> header file
Example 15-9 - the set container

The multiset container

  • associative container
  • elements are not necessarily unique
  • elements stored in sorted order
  • requires <set> header file
Example 15-10 - the multiset container

The map container

  • associative container
  • makes use of a key-value pair
  • keys values must be unique
  • elements stored in sorted order by the key
  • requires <map> header file
Example 15-11 - the map container

The multimap container

  • associative container
  • makes use of a key-value pair
  • keys values are not unique
  • elements stored in sorted order by the key
  • requires <map> header file
Example 15-12 - the multimap container

The unordered_set container

  • associative container
  • introduced in C++11
  • the container is implemented using a hash
  • elements are unique
  • elements are not stored in sorted order
  • requires <unordered_set> header file
Example 15-13 - the unordered_set container

The unordered_multiset container

  • associative container
  • introduced in C++11
  • the container is implemented using a hash
  • elements are not necessarily unique
  • elements are not stored in sorted order
  • requires <unordered_set> header file
Example 15-14 - the unordered_multiset container