how to initialise const variables

Nicholas Wilson via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Feb 25 18:32:44 PST 2016


struct A
{
      const (void *) p;
}

struct B
{
     A    a;
     this(void * _p)
     {
         a.p = _p;
     }
}

I cannot change the definition of A
how do I initialise b.a.p?


More information about the Digitalmars-d-learn mailing list