Skip to content
Tom Clune edited this page Feb 20, 2019 · 1 revision

Maps are collections of elements that are indexed by "keys". Typically keys are either strings or integers, but almost anything can be used. Maps are also known by various other names such as hashes, hash-functions and associative arrays.

Note that accessing a map that has keys of type integer, it will superficially resemble accessing a vector (or even an array). But with maps there is no implication that the range of indices are contiguous. E.g., a map could have just two elements whose keys are -17 and 1,234,567.

Clone this wiki locally