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)
  
 
PREVIOUS NEXT
Tagged: #vector #cpp
ADD COMMENT
Topic
Name
8+7 =