ContainersVectors
Growing a vector
A std::vector holds a variable number of elements. push_back adds one at the end and size returns the current count.
Code example
std::vector<int> v{2, 5};
v.push_back(8); Walkthrough
Appending 8 makes it the third element. The size becomes 3 and the first value stays 2.