Forward reference in struct

Simen Haugen simen at norstat.no
Mon Oct 8 05:44:20 PDT 2007


I've hit a problem with forward referencing. Is it possible to manually add 
a forward reference, or isn't what I'm trying to do here allowed?

struct A {
 B b;
}

struct B {
 union {
  int i;
  A a;
 }
}


t.d(5): struct test.A unable to resolve forward reference in definition
t.d(10): anonymous union unable to resolve forward reference in definition
t.d(9): struct test.B unable to resolve forward reference in definition 




More information about the Digitalmars-d-learn mailing list