create a 2d vector c++ code example
Example 1: size of a matrix using vector c++
// finding size of a square matrix
myVector[0].size();
Example 2: initialising 2d vector
// Initializing 2D vector "vect" with
// values
vector<vector<int> > vect{ { 1, 2, 3 },
{ 4, 5, 6 },
{ 7, 8, 9 } };