Hey guys, came across this in a book tonight. I think I understand it but I'd like to be sure.
Code:
BOOL g_bTileStates[4][4];
int g_iTiles[4][4];
for(int i = 0; i < 4; i++)
for(int j = 0; j < 4 j++)
{
g_bTileStates[i][j] = FALSE;
g_iTiles[i][j] = 0;
}
the two for loops I get, they index through each separate element of the array. The part that threw me is the use of the = operator. What effect does
g_iTiles[i][j] = 0; have on the array? It doesn't seem to be setting the values of i and j. Does this mean that an array can hold a third piece of information other than it's elements?