Original Post
Hi, I have an vector of vectors:
vector<vector<float> > vectors;
Now, the dimension (size) of the inner vectors is fixed, but on the outer I am often pushing:
vector<float> new;
...
vectors.push_back(new);
This leads, from time to time to reallocation of the outer vector. In this reallocation, will all the inner vectors be swapped, or is it somehow smart enough to just move the pointers? I need random indexing, and the "push_back" is actually not in a time critical section of the code, but if it sometimes moves the whole thing ... What would you do instead? Thanks! Nathan