I would like to get a two-dimensional array of int arr
, with which I can access through arr [i] [j].
As far as I understand, I could declare int arr[10][15];
to get such an array. In my case, the size, however, is variable, and as far as I understand, this syntax does not work if the size of the array is not hardcoded, but I use a variable like int arr[sizeX][sizeY]
.
What is the best workaround?
source share