Nested struct member has no access to the enclosing class data

Andrej Mitrovic andrej.mitrovich at gmail.com
Mon Aug 6 14:51:15 PDT 2012


On 8/6/12, H. S. Teoh <hsteoh at quickfur.ath.cx> wrote:
> Try outer.i instead of just i.

There is no "outer". A nested struct has the same access as a nested
static class, meaning no access to any outer members unless they're
static. OP could use a nested non-static class, but I don't know if
the complications are worth it.


More information about the Digitalmars-d-learn mailing list