// program that sets up a reference to the first value in a vector, // but the vector is resized when a value is added to it, making this // a reference to an unused part of memory #include #include using namespace std; int main() { vector v{10, 20,}; int & x = v[0]; v.push_back(30); x++; cout << x << endl; return 0; }