Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

2d vector size c++

#include <iostream>
#include <vector>

int main(){
    std::vector<std::vector<int>>MyVector;
  std::cout << "Rows in the 2d vector: " << MyVector.size() <<
    std::endl << "Collumns in the 1st row: " << MyVector[0].size() <<
    std::endl;
  return 0;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #vector #size
ADD COMMENT
Topic
Name
7+2 =