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