|
list::backpublic member function
reference back ( ); const_reference back ( ) const; Access last element Returns a reference to the last element in the container.Unlike member list::end, which returns an iterator just past this element, this function returns a direct reference. ParametersnoneReturn valueA reference to the last element in the list container.Member types reference and const_reference are the reference types to the elements of the container (for the default storage allocation model, allocator, these are T& and const T& respectively). Example
Output:
ComplexityConstant.See also
|