Hi all
I'm wondering if it's possible to define a mutli-dimensional array using variables, such as the following:
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.Code:int CustomCheckersBoard[a][b];
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 :-)



LinkBack URL
About LinkBacks



