revbit1.cpp

We use cookies. Read the Privacy and Cookie Policy

revbit1.cpp

#include ‹iostream.h›

#include ‹stl.h›

int array[] = {1, 5, 2, 3};

int main() {

 list‹int› v(array, array + 4);

 reverse_bidirectional_iterator‹list‹int›::iterator, int, list‹int›::reference, list‹int›::difference_type› r(v.end());

 while (r != v.begin())

 cout ‹‹ *r++ ‹‹ endl;

 return 0;

}