Associative array for array of classes
Stewart Gordon
smjg_1998 at yahoo.com
Thu Apr 27 06:33:20 PDT 2006
clayasaurus wrote:
<snip>
> Class[char[]] assoc;
> assoc["3"] = new Class;
>
> Now, lets say I want to test if assoc["3"] has already been initialized
> before I allocate it, but testing it with
>
> if (assoc["3"] is null)
> assoc["3"] = new Class;
>
> I get a seg fault.
<snip>
That's strange. It should be an ArrayBoundsError.
Stewart.
More information about the Digitalmars-d-learn
mailing list