C++

C++ Containers

Introduction#

C++ containers store a collection of elements. Containers include vectors, lists, maps, etc. Using Templates, C++ containers contain collections of primitives (e.g. ints) or custom classes (e.g. MyClass).

C++ Containers Flowchart

Choosing which C++ Container to use can be tricky, so here’s a simple flowchart to help decide which Container is right for the job. C++ Containers Flowchart

This flowchart was based on Mikael Persson’s post. This little graphic in the flowchart is from Megan Hopkins


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow