 <p>The vector handles its memory outside of the structure, in the heap as mentioned in another answer. So resizing or reallocating the vector inside the structure won't change the structure's size at all, not even the vector containing that structure.</p> <p><a href="http://www.cplusplus.com/reference/vector/vector/" rel="nofollow">http://www.cplusplus.com/reference/vector/vector/</a></p> <p>The vector handles its own memory dynamically ( in the heap ).</p>