Everyone I am new to C++ and just moved from C. While studying vectors I came across this:
    #include <iostream>
    #include <vector>
    using namespace std;
    int main()
    {
        vector <int> g1;
        vector <int> :: iterator i;
        vector <int> :: reverse_iterator ir;
        for (int i = 1; i <= 5; i++)
            g1.push_back(i);
        cout << "Output of begin and end\t:\t";
        for (i = g1.begin(); i != g1.end(); ++i)
            cout << *i << '\t';
        cout << endl << endl;
        cout << "Output of rbegin and rend\t:\t";
        for (ir = g1.rbegin(); ir != g1.rend(); ++ir)
            cout << '\t' << *ir;
        return 0;
    }
My question is why here vector <int> :: iterator i; and is there a difference between vector <int> :: iterator i; and int i?
 
     
    