Associative array of dynamic array

Samuele Carcagno sam.carcagno at gmail.com
Sun Sep 9 05:18:25 PDT 2012


I would like to create an associative array that maps a string to 
a multidimensional dynamic array. In other words, I would like a 
data structure where I can access elements like this:

foo["key"][0][0]

Is this possible? If so I'm having trouble figuring out the 
correct syntax, the following (for one dimension) doesn't work:

auto foo = new int[5][string];

compilation fails with the following message:
Error: cannot implicitly convert expression (string) of type 
string to ulong

Thanks for any help!





More information about the Digitalmars-d-learn mailing list