fork download
  1. struct In {
  2. In *a, *b, *c;
  3. };
  4.  
  5. struct Out {
  6. In * ptr;
  7. };
  8.  
  9. void init( Out * obj ){
  10. obj->ptr->a = 0;
  11. obj->ptr->b = 0;
  12. obj->ptr->c = 0;
  13. }
  14.  
  15. void init2 ( Out * obj ){
  16. In * p = obj->ptr;
  17. p->a = 0;
  18. p->b = 0;
  19. p->c = 0;
  20. }
  21.  
  22. int main()
  23. {
  24. Out obj;
  25. obj.ptr = new In();
  26.  
  27. init(&obj);
  28. init2(&obj);
  29. }
  30.  
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
Standard output is empty