fork(2) download
  1. class E
  2. {
  3. int x;
  4. class B { };
  5. class I
  6. {
  7. B b; // E::B is private
  8. int y;
  9. void f(E* p, int i)
  10. {
  11. p->x = i; // (No) error: E::x is private
  12. }
  13. };
  14. int g(I* p)
  15. {
  16. // return p->y; // error: I::y is private
  17. }
  18. };
  19.  
  20. int main () {}
Success #stdin #stdout 0s 3136KB
stdin
Standard input is empty
stdout
Standard output is empty