fork download
  1. class Foo
  2. {
  3. public:
  4. int g;
  5. };
  6.  
  7. class Bar
  8. {
  9. public:
  10. Bar()
  11. {
  12. x = new Foo;
  13. x->g = 5;
  14. }
  15. Foo* x;
  16. };
  17.  
  18. int main()
  19. {
  20. const Bar a;
  21. a.x->g = 10;
  22. }
Success #stdin #stdout 0s 3464KB
stdin
Standard input is empty
stdout
Standard output is empty