Classes in D and C++

Walter Bright newshound at digitalmars.com
Mon Mar 5 00:43:33 PST 2007


Uno wrote:
>> Its not possible it seems to do e.g this:
>>
>> X  x(3);
>>
>> rather you have to do:
>>
>> X x = new X(3);
> 
> Yep, I don't like that syntax too. Everywhere news.. And although D has many great features such small things prevent me to switch to D.
> 

You can do:

	auto x = X(3);

and x will be put on the stack.



More information about the Digitalmars-d mailing list