fork(2) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class cos
  5. {
  6. };
  7.  
  8. void funkcja(cos *c)
  9. {
  10. c=new cos();
  11. cout<<(void*)c<<endl;
  12. }
  13.  
  14. int main()
  15. {
  16. cos *c=0;
  17. cout<<(void*)c<<endl;
  18. funkcja(c);
  19. cout<<(void*)c<<endl;
  20. return 0;
  21. }
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
0
0x9050008
0