accessing all the elements of a 2D vector code example
Example: initialzing a 2d vector in cpp
// Create a vector containing n row and m columns
vector<vector<int> > vec( n , vector<int> (m, 0));
// Create a vector containing n row and m columns
vector<vector<int> > vec( n , vector<int> (m, 0));