cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
About Vector Elements.
About Vector Elements.
Jan 14, 2011 at 7:50pm UTC
closed account (
zb0S216C
)
When a new element is added to a vector, does it create the element on the stack or on the heap?
Jan 14, 2011 at 7:51pm UTC
filipe
(1165)
Heap (technically, free store). std::vector keeps its elements in a dynamically allocated array.
Jan 14, 2011 at 7:52pm UTC
closed account (
zb0S216C
)
Thanks filipe!
Topic archived. No new replies allowed.