#include <vector> #include <iostream> using namespace std; int main() { vector<int> v; v.resize(5); vector<int>::iterator i = v.begin(); *i = 5; v.resize(10); cout << "v.begin() = " << *i << endl; }