return string from inside if block => Segmentation Fault: 11

Kapps via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 2 11:47:51 PDT 2015


On Tuesday, 2 June 2015 at 07:18:33 UTC, Robert M. Münch wrote:
> On 2015-06-01 17:29:08 +0000, Steven Schveighoffer said:
>
>> No, you must explicitly intialize. Classes are ALL reference 
>> types in D, no in-situ placement of classes
>
> Ok, thanks. Still to much C++ logic in my head ;-) I'm getting 
> rid of it step-by-step.

Note that if they were structs, they would be default initialized 
without having to new, similar in a way to C++ (but with a 
defined init value).


More information about the Digitalmars-d-learn mailing list