Increments an iterator by a specified number of positions.
template<class InputIterator, class Distance> void advance( InputIterator& _InIt, Distance _Off ); |
---|
std::list<int> m_list;
for( int i=0; i<10; i++ )
m_list.push_back( i );
list<int>::iterator it = m_list.begin();
advance(it,9);
cout << *it << endl;