AA of static array

z_axis z_axis at 163.com
Thu Mar 13 19:45:05 PDT 2008


在 Fri, 07 Mar 2008 21:39:21 +0800,Derek Parnell <derek at psych.ward> 写道:

> void main()
> {
>    alias int[5] S;
>   S[string] foo;
>   foo["abc"]    = [1,2,3,4,5]; // out of bounds!
>    foo["qwerty"] = [9,8,7,6,5];
> }

use alias int[] S instead.

regards!


More information about the Digitalmars-d-learn mailing list