fork download
  1. #include <iostream>
  2. #include <memory>
  3.  
  4. int main()
  5. {
  6. int *b;
  7. {
  8. std::auto_ptr<int> a(new int (5));
  9. b = a.get();
  10. }
  11. std::cout << *b << std::endl;
  12. }
Success #stdin #stdout 0s 3016KB
stdin
Standard input is empty
stdout
0