#include <iostream>
#include <vector>
using std::vector;
using std::cout;
using std::endl;
int main()
{
vector<int> vec{ 1, 3, 8, 23, 99, 12, 100, 7 };
vector<int>::iterator pos;
for (pos = vec.begin() + 1; pos < vec.end(); pos += 2) {
cout << *pos << ' ';
}
cout << endl;
}
/*
run:
3 23 12 7
*/