multidimensional dynamic arrays
    Steven Schveighoffer 
    schveiguy at yahoo.com
       
    Mon Nov 16 05:45:06 PST 2009
    
    
  
On Mon, 16 Nov 2009 08:42:28 -0500, Trass3r <mrmocool at gmx.de> wrote:
> Ellery Newcomer schrieb:
>>  auto array = new ubyte[][](width*height, numSprites);
>>  params might be backwards..
>
> Ah yeah, thanks, that was it.
> Don't get the reason for that syntax.
Especially now that static arrays are legitimate value types, new  
ubyte[1][2] looks to the compiler like a dynamic array of 1 ubyte[1]'s.
-Steve
    
    
More information about the Digitalmars-d-learn
mailing list