...

/

Use unordered_map with Custom Keys

Use unordered_map with Custom Keys

Learn to use unordered_map with custom keys.

We'll cover the following...

With an ordered map, the type of the key must be sortable, which means it must at least support the less-than < comparison operator. Suppose we want to use an associative container with a custom type that is not sortable. For example, a vector where (0,1)(0, 1) is not smaller or larger than (1,0)(1, 0) ...