I l@ve RuBoard Previous Section Next Section

reverse(), reverse_copy()

Reverses the order of elements in a container.



#include <algorithm> 


list<string> slist_copy( slist.size() ); 





reverse( slist.begin(), slist.end() ); 


reverse_copy( slist.begin(), slist.end(), slist_copy.begin() ); 
    I l@ve RuBoard Previous Section Next Section