Fixed size array initialization

psychoticRabbit meagain at meagain.com
Sun Feb 11 01:26:59 UTC 2018


On Sunday, 11 February 2018 at 01:13:00 UTC, psychoticRabbit 
wrote:
>
> Well, in C.. I can do:
>
> int arr[2] = { [0]=10, [1]=20 };
>
> I cannot work out how to do that in D yet (anyone know??)
>

Oh. just worked it out after reading this thread ;-)

int[2] arr = [ 0:10, 1:20 ];



More information about the Digitalmars-d-learn mailing list