I l@ve RuBoard Previous Section Next Section

iter_swap()

Swaps the values contained within the elements addressed by two iterators.



#include <algorithm> 


typedef list<int>::iterator iterator; 


iterator it1 = ilist.begin(), it2 = ilist.begin()+4; 


iter_swap( it1, it2 ); 
    I l@ve RuBoard Previous Section Next Section