So when we need to traverse a container from start to end we write something like
for (i = v->begin(); i != v->end(); i++)
assuming i
i
C++03 Section 23.1/7 says
23.1/7
begin() returns an iterator referring to the first element in the container. end() returns an iterator which is the past-the-end value for the container. If the container is empty, then begin() == end();
begin() returns an iterator referring to the first element in the container.
end() returns an iterator which is the past-the-end value for the container.
If the container is empty, then begin() == end();
begin() == end()