|
list::push_backpublic member function
void push_back ( const T& x ); Add element at the end Adds a new element at the end of the list, right after its current last element. The content of this new element is initialized to a copy of x.This effectively increases the list size by one. Parameters
Return valuenoneThe storage for the new element is allocated using Allocator::allocate(), which may throw exceptions on failure (for the default allocator, bad_alloc is thrown if the allocation request does not succeed). Example
The example uses push_back to add a new element to the container each time a new integer is read. ComplexityConstant.See also
|