#include
#include
#include
using namespace std;
int main()
{
vector vectorObject;
vector::iterator p;
int i;
for(i = 0; i <10; i++)
vectorObject.push_back(i);
cout << "Original ordering: ";
for(p=vectorObject.begin(); p cout << *p << " ";
cout << endl;
// rotate right two positions using reverse iterators
rotate(vectorObject.rbegin(), vectorObject.rbegin()+2, vectorObject.rend());
cout << "Order after two right rotates: ";
for(p=vectorObject.begin(); p cout << *p << " ";
cout << endl;
return 0;
}