struct template help

Danyal Zia via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jul 12 12:38:34 PDT 2014


On Saturday, 12 July 2014 at 19:32:48 UTC, seany wrote:
> do I have to initialize all variables of the struct? or may I 
> also use a this(){} in the struct and initialize only those 
> which are known at a given moment?

You can initialize in constructor this(), but you can't 
initialize partial fields of struct when using pointer to struct. 
There would be other trivial ways to do what you are trying to 
do. Also, I never used any pointer to struct (which is of value 
type) in my code .


More information about the Digitalmars-d-learn mailing list