On Sun, Sep 9, 2012 at 2:18 PM, Samuele Carcagno <[email protected]> wrote: > 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]
The type you want is int[][][string]. You can use it like this:
alias int[][][string] MyArray;
void main()
{
MyArray foo;
foo["abc"] = [[0,1,2], [3,4], []];
foo["def"] = [[0]];
assert(foo["abc"][0][1] == 1);
}
