Answers for "how to initialize 2d vector in c+"

C++
3

2d vector c++ declaration

vector< vector<int>> a(rows, vector<int> (cols));
Posted by: Guest on January-02-2021
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

Code answers related to "how to initialize 2d vector in c+"

Browse Popular Code Answers by Language