This calls the removed element's destructor.
Parameters
noneReturn value
noneExample
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
In this example, the elements are popped out of the vector after they are added up in the sum. Output:
The elements of myvector summed 600 |
Complexity
Constant.See also
| vector::push_back | Add element at the end (public member function) |
| vector::erase | Erase elements (public member function) |
