|
vector::pop_backpublic member function
void pop_back ( ); Delete last element Removes the last element in the vector, effectively reducing the vector size by one and invalidating all iterators and references to it.This calls the removed element's destructor. ParametersnoneReturn valuenoneExample
In this example, the elements are popped out of the vector after they are added up in the sum. Output:
ComplexityConstant.See also
|