Philippe Sigaud:
Keep in mind all these structures (AA and dynamic arrays) are
reference types.
There are bug-prone things you have to keep in mind.
Not exactly a reference type, this is by D specs:
import std.stdio;
import std.array: popFront;
void main() {
auto d = [1:[2, 3]];
a
On Sun, Sep 9, 2012 at 2:48 PM, Samuele Carcagno wrote:
> thanks a lot! both solutions work, to initialize the arrays of int I'm
> doing:
>
> int[][][string] foo;
> foo["key"] = new int[][](6,6);
> foo["key"][0][0] = 5;
>
> it seems to work.
Great!
Keep in mind all these structures (AA and dynam
thanks a lot! both solutions work, to initialize the arrays of
int I'm doing:
int[][][string] foo;
foo["key"] = new int[][](6,6);
foo["key"][0][0] = 5;
it seems to work.
On Sunday, 9 September 2012 at 12:17:47 UTC, Samuele Carcagno
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]
Is this possible? If s
On Sun, Sep 9, 2012 at 2:18 PM, Samuele Carcagno 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[][][