June 2025
Intermediate to advanced
1093 pages
33h 24m
English
Containers are an important part of the standard library. Because they play a central role and also take up a lot of space in it, I will go into them in detail later in Chapter 24. Here I will give you a brief overview so that you know which wheels you don't have to reinvent.
So far, you have encountered types that can hold a single piece of data. For example, if you wanted to store two int values, you would have needed two variables (such as int x, y;). With array<int>, you have already had a taste of one container, and I will explain the background now.
What do you do if you want to store a lot of values? Do you maybe want to iterate over all the values in a loop? Or perhaps you don't know beforehand ...
Read now
Unlock full access