Answers for "how to make a two dimensional vector c++"

C++
9

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));
Posted by: Guest on June-19-2020
0

c++ multidimensional vector

vector<vector<int>> matrix(3, vector<int>(3));
// creates a 3x3 matrix of integers with vectors inside a main vector
Posted by: Guest on April-16-2022

Code answers related to "how to make a two dimensional vector c++"

Browse Popular Code Answers by Language