struct encapsulation

alex alexibu.nospamplease at mac.com
Mon Feb 19 18:18:05 PST 2007


This code compiles - I don't think it should.
If b is a private member of A then why can I change it outside the class ?

struct A
{
private:
	int b;
};


int main()
{
	A a;
	a.b = 10;

	return 0;
}



More information about the Digitalmars-d mailing list