You create a vector of 10 integers, create a pointer to integer 5 and then remove the 4th integer and suddenly your pointer will be pointing at the value which used to be 6 but is now 5. Not what I want.
for(int i=0; i < 10; i++)
int * bar = &(foo);
std::cout << bar;
std::cout << " " << bar;
I think STL List won't cause this trouble because it is a linked list?