Регистрация | Вход
struct s1{ s1(int x):x(x) {} int getx() const { return x; }private: const int x;};struct s2 { int x; };void ChangePrivat(){ s1 s(42); printf("%d\n", ((s2*)(&s))->x); ((s2*)(&s))->x = 55; printf("%d\n", s.getx());}