Insert an element into an Associative Array ?

Chris Pons cmpons at gmail.com
Wed Apr 4 11:57:54 PDT 2012


I'm playing around with associative arrays right now and I can't
seem to figure out how to add additional objects to the array. I
tried insert but it doesn't recognize both arguments.

Also, if I do this it produces an error:

Node[bool] test;

Node node;

Node[bool] temp = [ false:node ];

test ~= temp;


Error	1	Error: cannot append type Node[bool] to type
Node[bool]	C:\Users\CP\Documents\Visual Studio
2010\Projects\D\STDS\NPC.d	256	

Does this mean you can't use the append operator on associative
arrays ? ( this one ~= ) ?


More information about the Digitalmars-d-learn mailing list