struct and default constructor

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Fri Oct 10 09:24:00 PDT 2014


On 10/10/2014 3:25 AM, ketmar via Digitalmars-d wrote:
> people also keep forgetting about default values and want
> default constructors to simulate this:
>
>    struct {
>      int n = 42;
>      string s = "default string";
>    }

That's a good observation.


More information about the Digitalmars-d mailing list