Let’s we have
std::vector <std::vector <unsigned short int>> face;
face.resize(nElm);
Its OK to resize() for the first dimension. However, I also want to reserve() memory for the elements of face; I mean for the second dimension. (I am aware of the difference between resize() and reserve())
Just do
or if you do not use c++11:
If you want to just
reservefor the second dimension then just do that instead ofresize