As for vector<char>
and vector<int>
, the char
elements and the int
elements are both stored in the stack,but what about a vector<string>
?
If I want to store a huge vector<string>
with many strings, should I use new vector<string>
to store my vector in the heap?