Multi-dimensional arrays using variables
Hi all
I'm wondering if it's possible to define a mutli-dimensional array using variables, such as the following:
Code:
int CustomCheckersBoard[a][b];
It doesn't seem anything usual but C++ seems to refuse to accept anything except constant integers when it comes to multi-dimensional arrays. It won't even accept a and b if they're constants.
Any suggestions about how I might get round this? The context, as you may have guessed, is to allow the user to define the size of a custom checkers board.
Cheers :-)