Return iterator to beginning
Returns an iterator pointing to the first element in the vector.
Notice that, unlike member vector::front, which returns a reference to the first element, this function returns arandom access iterator pointing to it.
If the container is empty, the returned iterator value shall not be dereferenced.
Parameters(参数)
none
Return Value
An iterator to the beginning of the sequence container.
If the vector object is const-qualified, the function returns a const_iterator. Otherwise, it returns an iterator.
Member types iterator and const_iterator are random access iterator types (pointing to an element and to a const element, respectively).
---------------------------------------------------
Output:
myvector contains: 1 2 3 4 5 |
----------------------------------