I'm trying to create an array that can be resized, and automatically renumbered, at the moment, what I have works for up to a 3x3 array, but anything larger than that doesn't work. I've tried doing this with int instead of char for the type or the array, but then I'm not able to write a character to the board, only the ascii numerical equivalent.
Any help would be appreciated, thanks.
Code for a 2 dimensional array of char that could be sized to any width and height would stop there. The rest of what you have looks like you would use if you were trying for a 3 dimensional (cube, box, whatever instead of board) array. That is, if you could retain your sanity with all the detractions of the dereferences and pointer math.
Another common option is to leave the board in a single dimensional array. Depending on how you interface to the board, it has advantages and disadvantages.
For example, a 3 x 3 board would use 9 elements in an array. The first 3 would be the first row (or first column depending on your preference) the next 3 would be the second row and the last 3 would be the third and final row.
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.