build a vector of vectors, sizes not known
I want to fill this vector in a nested loop. problem is, that I don't want to append the vectors from ground to top. also I do not know the final size of the (sub-)vectors.
vector<vector<int> > f;
so maybe it can happen that I want to set element f, next f and so on.
how would you do that? should I check the size before every insert and increase it if needed? or is there something better for such a data structure type out there?