Marc Schütz:

Alternatively, you could create a union with a private and a public member with the same types, but I wouldn't recommend it. Besides, the members would need to have different names:

    class Foo {
        union {
            private int a;
            public int b;
        }
    }

You can call them a and a_. Why are you not recommending this solution? It looks cool (if it works).

Bye,
bearophile

Reply via email to