previous | start | next

## Two-Dimensional Arrays

- It often happens that we want to store collections of numbers that have a two-dimensional layout.
- Such an arrangement, consisting of row and columns of values, is called a two-dimensional array, or a matrix.
- C++ uses an array with two subscripts to store a two-dimensional array:

  >     const int BALANCE_ROWS = 11;
  >     const int BALANCE_COLS = 6;
  >     double balances[BALANCE_ROWS][BALANCE_COLS];

- To select a particular element in the two-dimensional array, we need to specify two subscripts in separate brackets to select the row and column.

previous | start | next