<<< Two-dimensional Array Example | Index | Multidimensional Array as Function Argument >>> |
Multidimensional arrays are arrays of arrays:
int good[3][4]; // three arrays of arrays of four integers int bad[3,4]; // bad syntax, compile-time error
Two-dimensional array is really a one-dimensional array, each of whose elements is an array.
The subscripts are written as
x = a[ i ][ j ]; // correct: a[row][column]
rather than
x = a[ i, j ]; // compile-time error
 
<<< Two-dimensional Array Example | Index | Multidimensional Array as Function Argument >>> |