Creating array of structs being used in C interface

Timoses via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Nov 27 07:23:33 PST 2016


On Sunday, 27 November 2016 at 14:27:54 UTC, Adam D. Ruppe wrote:
> That's because int is zero initialized by default and thus 
> doesn't need anything more than a call to zero memory function, 
> and double isn't (it is NaN), so it gets an initializer data 
> blob. If you make it = 0 it might work, but even then, the 
> compiler may want to reference the initializer just because 
> there's a non-default init value!


Does your answer also explain why it works when I move the 
mytypes.d into the source/ folder?



More information about the Digitalmars-d-learn mailing list