declare 2d vector with length c++ code example
Example 1: how to make a 2d vector in c++
// Create a vector containing n
//vectors of size m, all u=initialized with 0
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();