Is there a container like std::vector that is guaranteed not to be resized or re-allocated? I would like to take pointers to objects stored in the vector, but I want to guarantee the array isn't re-allocated. I can't use boost::array because I want the size of the array to be dynamically determined at runtime.
What do you want to happen when you're inserting a new element? If you don't plan on inserting anything, then you can use std::vector; it won't reallocate on its own.
There's also std::deque, which doesn't reallocate existing elements even as you expand it and std::list, which doesn't reallocate even if you erase in the middle.