Horje
initialising 2d vector Code Example
initialize 2d vector of ints c++
auto M = 4;	// num of rows
auto N = 3; // num of cols in each row
auto default_value = 1; // default value of all int elements
std::vector<std::vector<int>> matrix(M, std::vector<int>(N, default_value));
initialzing a 2d vector in cpp
  // Create a vector containing n row and m columns
  vector<vector<int> > vec( n , vector<int> (m, 0));  
initialising 2d vector
// Initializing 2D vector "vect" with 
// values 
vector<vector<int> > vect{ { 1, 2, 3 }, 
                           { 4, 5, 6 }, 
                           { 7, 8, 9 } }; 




Cpp

Related
How to create an ArrayList Code Example How to create an ArrayList Code Example
system("pause") note working c++ Code Example system("pause") note working c++ Code Example
Integer Moves codeforces solution Code Example Integer Moves codeforces solution Code Example
three way comparison operator c++ Code Example three way comparison operator c++ Code Example
prevent getting data from data-tooltip-content tippyjs Code Example prevent getting data from data-tooltip-content tippyjs Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10