Array with char-keys

Bill Baxter dnewsgroup at billbaxter.com
Thu May 24 15:59:43 PDT 2007


Regan Heath wrote:
> Pragma Wrote:
>> What you want is an associative array:
>>
>> char[char[]] myMap;
> 
> minor correction:
> 
> char[] [char[]] myMap;
> 
> Regan
> 

Which is a mistake that's a lot harder to make with a little alias 
magic.  Easier to read the intent as well.

   alias char[] string;

   string[string] myMap;

--bb



More information about the Digitalmars-d mailing list