Associative array for array of classes

Stewart Gordon smjg_1998 at
Thu Apr 27 06:33:20 PDT 2006

clayasaurus wrote:
> 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.

That's strange.  It should be an ArrayBoundsError.


More information about the Digitalmars-d-bugs mailing list