... vector’s first and last elements, respectively. Notice the difference between functions
front returns a reference to the first element in the
vector, while function
begin returns a random-access iterator pointing to the first element in the
vector. Also notice the difference between functions
back returns a reference to the
vector’s last element, whereas function
end returns a random access iterator pointing to the location after the last element.
The results of
back are undefined when called on an empty
Lines 23–24 illustrate ...