Sequence Containers
Sequence containers, sometimes referred to as sequential containers, are a particular class of containers where the order in which their elements are stored is decided by the programmer rather than by the values of the elements. Every element has a certain position that is independent of its value.
The STL contains five sequence container classes:
Array
The array container is a fixed-size data structure of contiguous elements. It recalls the static array that we saw in Chapter 1, Getting Started:
An array's size needs to be specified at compile time. Once defined, the size of the array cannot be changed.
When an array is created, the size elements it contains are initialized next to each other in memory. While elements cannot be added or removed, their values can be modified.
Arrays can be randomly accessed using the access operator with...