www.digitalmars.com         C & C++   DMDScript  

D - Associative Array indexed by int

reply Regy <info regy.org> writes:
I would like to make an char associative array indexed by int... For example:
cont[3]="D lang";
I tried declare it like this:
char[] [int] cont;

but it doesn`t work properly... I`ve got a Segmentation Core Fault all the
time... How to declare it properly?
May 06 2007
parent Johan Granberg <lijat.meREM OVEgmail.com> writes:
Regy wrote:

 I would like to make an char associative array indexed by int... For
 example: cont[3]="D lang";
 I tried declare it like this:
 char[] [int] cont;
 
 but it doesn`t work properly... I`ve got a Segmentation Core Fault all the
 time... How to declare it properly?
This is the old newsgroup the new one is digitalmars.D The code you posted looks corect so te problem is probably in other parts of your code.
May 07 2007