I have a
vector < vector<int> > TwoDim;
What does TwoDim.size() give me? Is it (x*y), assuming x = rows, y = columns in the sense of an array?
How do I get the size of x?
How do I get the size of y?
Thanks,
codeguy
Printable View
I have a
vector < vector<int> > TwoDim;
What does TwoDim.size() give me? Is it (x*y), assuming x = rows, y = columns in the sense of an array?
How do I get the size of x?
How do I get the size of y?
Thanks,
codeguy
It gives the number of vector<int> in your vector (aka, the size of x).
vector[n].size() gives the size of your y size.
Which is why Boost.MultiArray is a better choice for most applications than jagged vectors.