Home | Projects | Notes > C++ Programming > Associative Container - std::map, std::multimap, std::unordered_map, std::unordered_multimap

Associative Container - std::map, std::multimap, std::unordered_map, std::unordered_multimap

 

The STL Maps

Associative Containers

4 Types of Maps

 

std::map

Initialization

Common Methods

Like sets, maps do not support the concept of front and back.

For more information, see cppreference.com.

L22: Notice that the std::map's find() method is different from the std::find() method in the STL <algorithm> library. You should use std::map's find() because it knows all about the internal implementation of the std::map, and it's going to be much more efficient.

 

std::multimap

 

std::unordered_map

 

std::unordered_multimap

 

Project: Usage of std::map

Ensure that your custom classes provide the following three elements to work correctly with the STL: