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?
As you did:
void main() {
int i = 42;
B b = B(&i);
int* p = cast(int*)b.a.p;
assert(*p == 42);
}
