Code:
char onedee[ SIZE ];
Read it from right to left.
An array SIZE elements big, called onedee of type char. You can access each element of the array by doing:
Code:
x = onedee[ SOMENUMBER ]; /* Get the value in slot SOMENUMBER and put it in x. */
onedee[ SOMENUMBER ] = x; /* Put the value of x in slot SOMENUMBER. */
The only "hard" thing to rememeber, is that you start counting from zero up trough SOMESIZE-1. Thus, if you have an array of 8 items, you have valid elements:
Code:
onedee[ 0 ]
onedee[ 1 ]
...
onedee[ 7 ] /* if SOMESIZE is 8, you get up to 8-1 to access... */
Two dimensional arrays are done exactly the same way, but you have a "row" element also.
Code:
char twodee[ ROW ][ COLUMN ];
Think of it as a grid, such as graph paper, or the pixels of your monitor. Again, you get 0 through SIZE-1 for both accessors. So, if we had an 8 by 8 grid, we would get:
Code:
twodee[ 0 ][ 0 ]
twodee[ 0 ][ 1 ]
...
twodee[ 0 ][ 7 ] /* all the elements in the first row... */
twodee[ 1 ][ 0 ]
twodee[ 1 ][ 1 ]
...
twodee[ 1 ][ 7 ] /* all the elements in the second row... */
...
...
twodee[ 7 ][ 7 ] /* up through the very last item in the last row... */
Quzah.