Answers for "how to make a 2d vector in c++"

C++
7

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
3

2d vector c++ declaration

vector< vector<int>> a(rows, vector<int> (cols));
Posted by: Guest on January-02-2021
5

initialising 2d vector

// Initializing 2D vector "vect" with 
// values 
vector<vector<int> > vect{ { 1, 2, 3 }, 
                           { 4, 5, 6 }, 
                           { 7, 8, 9 } };
Posted by: Guest on May-16-2020
-3

how to make 2d vector

2D vector
Posted by: Guest on October-08-2020

Browse Popular Code Answers by Language