About Vector Elements.

closed account (zb0S216C)
When a new element is added to a vector, does it create the element on the stack or on the heap?
Heap (technically, free store). std::vector keeps its elements in a dynamically allocated array.
closed account (zb0S216C)
Thanks filipe!
Topic archived. No new replies allowed.