Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

2d vector cpp

For user defined size:

vector<vector<int>> vec( n ); 
where n -> number of rows

vector<vector<int>> vec( n , vector<int> (m, 0)); 
where n -> number of rows
where m -> number of columns (all initialized with 0)
  
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #vector #cpp
ADD COMMENT
Topic
Name
6+9 =