If I were to implement a vector class, I'd use a dynamically allocated array internally to store the items. Whenever that buffer would become to small, I would create a new buffer double the size, copy over the items, and delete the old buffer - thus not needing to regrow the buffer each time an item is pushed.
This approach has some serious problem in C++: It's impossible to allocate an array (new[]) of a type with no default constructor. Obviously std::vector somehow works around that limitation as it allows me to use any item type I want - even if it has no default constructor.
I tried to look at the source code, but it seems to be just turtles all the way down - using endless amounts of code and some serious black magic. I would really appreciate someone explaining how this works under the hood - if possible in a more comprehensible way than the source does.