This program illustrates how to shrink the capacity of a vector object, and thereby simulate "trim" and "reset" member functions, which do not currently exist in the vector class interface. Press Enter to continue ... First we illustrate capacity behavior when vector objects are assigned. Press Enter to continue ... For v1 we have: Size = 5 Capacity = 7 Contents: 5 5 5 5 5 Press Enter to continue ... For v2 we have: Size = 10 Capacity = 12 Contents: 10 10 10 10 10 10 10 10 10 10 Press Enter to continue ... For v3 we have: Size = 15 Capacity = 17 Contents: 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 Press Enter to continue ... Now we perform v1 = v2 and v3 = v2 and then redisplay both v1 and v3. Press Enter to continue ... For v1 we have: Size = 10 Capacity = 10 Contents: 10 10 10 10 10 10 10 10 10 10 Press Enter to continue ... For v3 we have: Size = 10 Capacity = 17 Contents: 10 10 10 10 10 10 10 10 10 10 Press Enter to continue ... Next we illustrate capacity behavior when vector objects are copied. Press Enter to continue ... So ... we create v4 as a copy of v3. Press Enter to continue ... For v4 we have: Size = 10 Capacity = 10 Contents: 10 10 10 10 10 10 10 10 10 10 Press Enter to continue ... Now we show how to "trim" the capacity of a vector down to match its size. Press Enter to continue ... For v5 we have: Size = 5 Capacity = 10 Contents: 5 5 5 5 5 Press Enter to continue ... Now we use the "self-swapping" idom vector(v5).swap(v5) to "trim" the capacity of v5. After this, we have for v5: Size = 5 Capacity = 5 Contents: 5 5 5 5 5 Press Enter to continue ... Finally we show how to "reset" a vector so that both its size and its capacity are reduced to zero. Press Enter to continue ... For v6 we have: Size = 5 Capacity = 10 Contents: 5 5 5 5 5 Press Enter to continue ... Now we use "swapping-with-an-empty-temporary" idom vector().swap(v6) to "reset" v6 to an empty vector of capacity zero. After this, we have for v6: Size = 0 Capacity = 0 Contents: Press Enter to continue ...