Non-Initialized Dynamic Arrays Construction

TheFlyingFiddle theflyingfiddle at gmail.com
Mon Feb 24 03:16:05 PST 2014


On Monday, 24 February 2014 at 11:11:44 UTC, Nordlöw wrote:
> Is it possible void construct a dynamic array such as b in
>
>     int n = 3;
>     auto b = new float[n];
>
> similar to what we do with static arrays as in
>
>     int[3] c = void;

http://dlang.org/phobos/std_array.html#.uninitializedArray is 
what you want.


More information about the Digitalmars-d-learn mailing list