#include #include #define SIZE 10 using namespace std; int main() { vector ints(SIZE); for(int i=0; i::const_iterator it = ints.cend(); // starting past the end of the container while(it > ints.cbegin()) { it -= 2; // move back by 2 elements cout << *it << " "; if(it <= ints.cbegin()) // stop when we reach or we have passed the first element break; } cout << endl; }