int-double auto array

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Mar 17 21:00:03 PDT 2015


On Wednesday, 18 March 2015 at 03:54:01 UTC, Dennis Ritchie wrote:
> Hi.
> To create int-double array I have to pre-initialize the auto 
> array:

There's no such thing as an int double array, what you made there 
is just a double[]. The ints are converted to double when added 
to that array.

So you can just do

double[] s;


More information about the Digitalmars-d-learn mailing list