First page Back Continue Last page Graphics
Two Dimensional Arrays
C++ doesn't supply a special 2D array type.
You use an array for which each element is an array itself. (see text figures 5.5 and 5.6).
Definition: int my_matrix [ 10 ] [ 4 ] ;
my_matrix is an array with 10 elements.
each element is an array of 4 integers.
my_matrix [ 0 ] is the first element in the my_matrix array. It is an array of 4 elements.