how to resize vectors vector?

So somewhere, I got this code:

vector<vector<int> > items;

but how do i resize it, for example to items[5][5]?
First you need to resize the outer vector, and then each of its elements.
If you use push_back it will resize itself......this is the advantage of vectors over arrays
vectors have also a resize function ( http://www.cplusplus.com/reference/stl/vector/resize.html )
Last edited on
Topic archived. No new replies allowed.