i'm trying to store a 3x3 grid using a nested array:
i tried doing
but having no joy, seems i'm doing a 2d array which works nothing like i had intended.
any ideas on how i'd have an array within an array, effectivey. so that i can access any co-ordinates from within a loop? (i.e. x = square[2][1]
Code:
| 0 | 1 | 2
-------------
0 | x | x | x
-------------
1 | x | x | x
-------------
2 | x | x | x
Code:
int square [3][3];
any ideas on how i'd have an array within an array, effectivey. so that i can access any co-ordinates from within a loop? (i.e. x = square[2][1]