//@Author Damien Bell
#include <iostream>
#include <vector>
using namespace std;


int main(){

    vector<int> vInts;
    
    for(int i=0; i<5; i++){
        vInts.push_back(i);
    }//0,1,2,3,4
    
    vector<int>::iterator iter;
    
    for(iter = vInts.begin(); iter < vInts.end(); iter++){
        cout << *iter <<endl;
    }
    cout <<endl << endl;
    
    
    vector<int>::reverse_iterator rIter;
    for(rIter = vInts.rbegin(); rIter < vInts.rend(); rIter++){//Rbegin- reverse begin.  The end of the vector is set as the beginning
        cout << *rIter <<endl;//Rend -  Set the beginning of the vector to the end.
        vInts.pop_back();//Removing the last element from the vector
    }    
    cout <<endl << endl;
    for (int i=0; i < vInts.size(); i++){
        cout << vInts[i]<<endl;
    }
    
    cout << "\n\nHuh, that's odd";
    
    
    
    
    
 return 0;
}
