Answers for "how to create a vector in c++ with bool 2d"

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
1

how to declare a 2d boolean vector in c++

vector< vector< bool > > verified( rows, vector<bool>( cols, false ) );
Posted by: Guest on October-14-2020

Browse Popular Code Answers by Language