Suppose I have a vector of ints,
std::vector numbers;
that is populated with a bunch of values, then I say do this (where an ent
Your paranoia is correct. Resizing a std::vector can cause its memory location to change. That means your oneNumber is now pointing to an old memory location that has been freed, and so accessing it is undefined behavior.
std::vector
oneNumber