1// vector::begin/end
2#include <iostream>
3#include <vector>
4
5int main ()
6{
7 std::vector<int> myvector;
8 for (int i=1; i<=5; i++) myvector.push_back(i);
9
10 std::cout << "myvector contains:";
11 for (std::vector<int>::iterator it = myvector.begin() ; it != myvector.end(); ++it)
12 std::cout << ' ' << *it;
13 std::cout << '\n';
14
15 return 0;
16}