Insert array into an AA
nrgyzer
nrgyzer at gmail.com
Tue Aug 16 12:17:33 PDT 2011
Hi everyone,
I've the following:
private static ubyte[][2][hash_t] classInstances;
this() {
classInstances[toHash()] = new ubyte[2]; // does not work
}
I want insert every class instance into the hashmap. Every class
instance should be contained in the map after the constructor was
called. When I compile my code, I get "Error: cannot implicitly
convert expression (new ubyte[](2u)) of type ubyte[] to ubyte[][]"
which is logical. But is there any way to insert every instance into
the array and define the array/map for this entry?
Thanks in advance!
More information about the Digitalmars-d-learn
mailing list