size of matrix vector in c++ code example
Example 1: initializing 2d vector
vector<vector<int> > vec( n , vector<int> (m, 0));
Example 2: size of a matrix using vector c++
// finding size of a square matrix
myVector[0].size();
vector<vector<int> > vec( n , vector<int> (m, 0));
// finding size of a square matrix
myVector[0].size();