What can you "new"

Steven Schveighoffer schveiguy at yahoo.com
Mon Mar 23 09:48:05 PDT 2009


On Sun, 22 Mar 2009 18:43:58 -0400, Unknown W. Brackets  
<unknown at simplemachines.org> wrote:

> The new construct allocates memory.  You can "new" anything that  
> requires a set amount of memory.
>
> This is equivalent to what you want:
>
> auto s = new char[0];

Also can be:

char[] s;

Which creates a new array of 0 length also.

-Steve



More information about the Digitalmars-d mailing list