I'm having a little brain fart on 2D arrays.
If I am going to declare a 2D array as
And if I am going to access, (5,7), in (X,Y) cords. Then the correct format would beCode:#define gridSize 20 int array[gridSize][gridSize];
If that is the case, what would be a good suggestion, in not to confuse the X and Y cords? Would the following work?Code:array[7,5]
Thank You in advanceCode:#define gridSize 20 int x = gridSize; int y = gridSize; int array[x][y]; //now if I want (5,7), in (X,Y) cords array[5][7]