Answers for "2d vector of fixed size 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
1

size of a matrix using vector c++

// finding size of a square matrix
myVector[0].size();
Posted by: Guest on June-25-2020

Browse Popular Code Answers by Language