how do one convert an integer that a user has entered into a location is an existing 2-d array?
When I run this, I get a windows error, even tho I get no compiler errors.
The actual array represents basically a game board. The comptuer "moves" 1 up, or 1 down, or 1 diagonally, etc. Obviously, the movement is based on its current position, as denoted by the coordinates (i.e. array[x][y]).
The problem arises when the computer makes an illegal move, such a 2 spaces across. To prevent that, I use an if/then statement, referring to the intended coordinates (array [x][y]), and subtracting from them the coordinated of the present position, which, of course, is itself based on previous movements, etc., etc., starting all the way back with array--the computer starts at the top left corner.
The problem is that the coordinates, or [x][y], change, depending on the position on the "board". So I would need to refer to array[x][y] as a variable, as opposed to array, which is always 16.
I hope that's kinda clear (!)