On Monday, 4 March 2013 at 05:07:10 UTC, Manu wrote:
Using dynamic arrays of dynamic arrays that way is pretty poor
form regardless of the language.
You should really use single dimensional array:
int matrix[SIZE*SIZE];
And index via:
matrix[y*SIZE+x]
(You can pretty this up in various ways, if this is too
unsightly)
On 4 March 2013 14:02, John Colvin
<[email protected]> wrote:
int[][] m = new int[][](rows, cols);
Does D support proper square array's this way? Or does it just
automate
allocation of the inner arrays?
Does it allocate all the associated memory in one block?
That's a really good point. I wonder if there is a canonical
matrix that would be preferred?