int array
#include <iostream.h> #include <stl.h>
int array [] = { 1, 5, 2, 3 };
int main () { vector<int> v (array, array + 4); stl_reverse_iterator<vector<int>::iterator, int, vector<int>::reference, vector<int>::difference_type> r (v.end ()); while (r != v.begin ()) cout << *r++ << endl; return 0; }
#include <iostream.h> #include <stl.h>
int array [] = { 1, 5, 2, 3 };
int main () { vector<int> v (array, array + 4); vector<int>:: reverse_iterator r; for (r = v.rbegin (); r != v.rend (); r++) cout << *r << endl; return 0; }