in c++
like I have
vector<vector<string> > input;
for(int i=0;i<=1000;i++){
vector<string> temp;
temp.pushback(everytime change the input value);
.
.
.just continues push some string in temp
.
.
temp.pushback(everytime change the input value);
input.pushback(temp);
}
my question is that, if the we put some string in temp for about 1000 times, will these temp share the address? like when i=500, the new temp will use the address of my first temp address which created when i=1? or although the vector(string) use the same name like temp, the address will always be different.
cause I want to make something like a 2D dynamic Array, so I think about
vector<vector<string> > input;
, and what I need is every-string-type vector temp should be safely keep input. is there any butter idea other than
vector<vector<string> > input;