Menu
Coddy logo textTech

Containers

Lesson 2 of 23 in Coddy's C++ - Standard Template Library course.

Containers are used to store objects and data. There are many different types of containers, but we are going to learn about the most used  and most important ones:

  • Vector
  • Queue
  • Priority Queue
  • Deque
  • Stack
  • List
  • Set
  • Map

When we are dealing with many elements, we need to store them in the containers mentioned before. That's why the containers are classified into three categories:

  • Sequence containers - (Vector, Deque, List)
  • Associative containers - (Set, Map)
  • Container adapter - (Stack, Queue, Priority Queue)

Sequence containers are used for implementing sequential data structures like an array.

Associative container are containers where each of the elements has a value that is associated with a key.

Containers adapters are containers with specific interface used to provide unique functionality to the pre-existing containers.

Try it yourself

This lesson doesn't include a code challenge.

All lessons in C++ - Standard Template Library