size of 2d array in c++
int rows = sizeof(arr) / sizeof(arr[0]); // returns rows
int col = sizeof(arr[0]) / sizeof(int); // returns col
size of 2d array in c++
int rows = sizeof(arr) / sizeof(arr[0]); // returns rows
int col = sizeof(arr[0]) / sizeof(int); // returns col
how to get size of 2d vector in c++
myVector[
Vector[0, 4, 2, 5],
Vector[1, 4, 2]
];
/*When you call for myVector[1].size() it would return 3 and [0] would return 4.
For the amount of rows (int vectors) in the 2d vector, you can just use myVector.size()
You can run this to see it in actions*/
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