Associative container
An associative container is a data structure that organizes elements for retrieval by keys rather than solely by positional order.
Clojure: The Essential Reference
An associative data structure is a collection that supports lookup of values by keys or numeric indexes.
- How it is used
- Organizes presence tests, nested reads, and functional updates around keyed access to maps and vectors.
- How deep it goes
- Specifies supported inputs, return behavior, missing-key cases, and exceptions through examples, without developing container internals.
- Examples
- Uses map-key and vector-index checks, nested lookups, word counters, and inventory updates.
- What you can do after
- Apply it via Clojure's contains?, get-in, select-keys, update, and update-in to test, read, and transform keyed data.
Read how Clojure: The Essential Reference explains associative container →
Learn C++ by Example
An associative container is a data structure that organizes elements by keys or ordered values rather than by positional indexes.
- How it is used
- Uses associative containers to implement dictionaries and support an answer-overlap game.
- How deep it goes
- Explains maps, multimaps, sets, access behavior, complexity, and bound searches, stopping short of full implementation internals.
- Examples
- Demonstrates hardcoded dictionaries, overlapping words, bound searches, and random dictionary selection.
- What you can do after
- Apply associative containers to build dictionary lookups and improve ordered searches.
Read how Learn C++ by Example explains associative container →
What to know first
- MapA map is an associative data structure that stores key-value associations and supports retrieving values by key.
- vectorA vector is an ordered sequence of elements treated as a single object, with its size fixed or resizable depending on the context.
Related concepts
- bagincludes · A bag, or multiset, is an unordered collection that permits duplicate elements and preserves their multiplicities.
- containsused by · Contains is a membership-query operation that reports whether a specified value, key, element, or substring occurs in a container or collection.
- Mapincludes · A map is an associative data structure that stores key-value associations and supports retrieving values by key.
- setincludes · A set is a collection of distinct elements in which membership, rather than order or duplicate occurrences, defines the collection.
- C++ standard librarypart of · The C++ standard library is the standardized collection of types, functions, algorithms, containers, and other facilities provided for the C++ programming language.
Questions about associative container
What is associative container?
An associative container is a data structure that organizes elements for retrieval by keys rather than solely by positional order.
Which Manning books explain associative container?
Clojure: The Essential Reference and Learn C++ by Example.
What should I know before learning associative container?
Manning books that teach associative container usually introduce Map and vector first.
What kinds of associative container are there?
Kinds of associative container include bag, Map and set.
What is associative container part of?
Associative container is part of C++ standard library. The C++ standard library is the standardized collection of types, functions, algorithms, containers, and other facilities provided for the C++ programming language.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

