Check out example codes for "size of a matrix c++". It will help you in understanding the concepts better.

Code Example 1

std::vector< std::vector<int> > my_array; /* 2D Array */

my_array.size(); /* size of y */
my_array[0].size(); /* size of x */

Learn ReactJs, React Native from akashmittal.com