Dynamic twodimensial array

Quantium qchessv2 at gmail.com
Tue Mar 31 21:39:30 UTC 2020


I know that to create a dynamic array:
int[] m = new int[a];
where a is a variable.
And if I need a twodimensial array, code
int[][] m = new int[a][b];
where a and b are variables doesn't work. I used dmd compiler, it 
says: "Cannot read b at compile time" but there is new int, so 
array should be dynamic. Where is the problem in my code?


More information about the Digitalmars-d-learn mailing list