multidimensional dynamic arrays

Ellery Newcomer ellery-newcomer at utulsa.edu
Sun Nov 15 18:50:15 PST 2009


Trass3r wrote:
> What's the short way to create a multidimensional dynamic array? I
> always forget how to do such stuff due to its strange syntax.
> 
> auto array = new ubyte[width*height][numSprites];
> doesn't work cause width*height is no "Integer constant expression"

auto array = new ubyte[][](width*height, numSprites);

params might be backwards..


More information about the Digitalmars-d-learn mailing list