1、reverse()//逆转
reverse(ivec.begin(), ivec.end());//12345变成54321
2、reverse_copy()
reverse_copy(ivec.begin()+1, ivec.end()-1,ostream_iterator<int>(cout," "));
3、rotate()//旋转,就是把后面的移动到前面,最前面的回到最后面
rotate(ivec.begin(),ivec.begin()+1,ivec.end());//12345变成23451
rotate(ivec.begin(),find(ivec.begin(),ivec.end(),4),ivec.end());//12345变成45123
4、rotate_copy()
rotate_copy(iset.begin(),ivec.begin()+1,iset.end(),ostream_iterator<int>(cout, " "));
rotate_copy(iset.begin(),iset.find(4),iset.end(),ostream_iterator<int>(cout, " "));