declaration/initialization of multidimensional arrays

Tyro[17] nospam at home.com
Sun Nov 18 17:38:02 PST 2012


On 11/18/12 7:53 PM, bearophile wrote:
> Tyro[17]:
>
>> What is the proper way to declare a multidimensional array?
>> In Java, I can do:
>>
>>     double[][] a = new double[M][N];
>
> In D (hopefully I have not swapped the to sizes, it's a too much common
> mistake in my D code):
>
> auto a = new double[][](M, N);
>
> Bye,
> bearophile

Thanks... This solved my issue. Much appreciated.


More information about the Digitalmars-d-learn mailing list