Trying to learn c++, I wrote the following code but don't understand why its not:
int arrNum[2][2] instead of
int arrNum[3][3] I thought the array started at zero, so I have two height, two length - if you start at zero, right?
int main() { int arrNum[3][3] = { {0,5,7}, {1,5,7}, {2,5,7} }; for (int i = 0; i < 3; ++i) { for (int j = 0; j < 3; ++j) { cout << arrNum[i][j] << " "; } cout << endl; } return 0; }