#include #include //for the i/o manipulator setw ("set width") #include #include //for class vector using namespace std; int main() { vector v { //Born holding 6 ints, but we will expand it to 7. 0, 10, 20, 30, 40, 50 }; vector::size_type n {v.size()}; //number of elements in the vector cout << "The vector was born holding these " << n << " ints:\n"; for (int i {0}; i < n; ++i) { cout << i << " " << setw(2) << v[i] << "\n"; } cout << "\n"; v.push_back(60); //Add a new element to the end of the vector. n = v.size(); //We just changed the size of the vector from 6 to 7. cout << "Now the vector holds these " << n << " ints:\n"; for (int i {0}; i < n; ++i) { cout << i << " " << setw(2) << v[i] << "\n"; } return EXIT_SUCCESS; }