On Mon, Nov 3, 2008 at 11:30 PM, Jesse Phillips <[EMAIL PROTECTED]> wrote: > In C allocating a static 2D array gives a continues chunk of memory. Java > creates an array that points to more arrays. Just wondering how D handles > this.
If it's a 2D fixed-size array, like: int[5][6] x; Then it is allocated as a single chunk of memory, and when you index it, it calculates the offset into that block of memory. But 2D dynamic arrays: int[][] y; Are handled like in Java - an array of arrays. When you index it, it indexes the first array, then indexes the second array.
