The C++ Containers (vectors, lists, etc.) are
generic vessels capable of holding many different types of data. For
example, the following statement creates a vector
Containers can hold standard objects (like the
in the above example) as well as custom objects,
as long as the objects in the container meet a few requirements:
- The object must have a default constructor,
- an accessible destructor, and
- an accessible assignment operator.
When describing the functions associated with these various
containers, this website defines the word TYPE
the object type that the container holds. For example, in the above
would be int
Similarily, when referring to containers associated with pairs of
are used to
refer to the key and value types for that container.