[ create a new paste ] login | about

Link: http://codepad.org/KQLcM6J3    [ raw code | output | fork ]

C++, pasted on Dec 25:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <iostream>
#include <vector>

int main()
{
    std::vector<int> arr;
    std::vector<int>::iterator i;

    arr.push_back(1);
    arr.push_back(2);

    i = arr.end() - 1;
    std::cout << *i << std::endl;

    return 0;
}


Output:
1
2


Create a new paste based on this one


Comments: