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));
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));
how to create 2d array using vector in c++
vector<vector<int>> vec(N, vector<int> (M, INT_MAX));
Explanation::
vector<vector<int>> -- will take the formed container
N -- Think like row of 2d Matrix
vector<int> (M, INT_MAX) -- In each row, there is again a vector associated with it,
that will formed 2d array.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us