fork download
  1. #include <memory>
  2.  
  3. int main()
  4. {
  5. std::auto_ptr<int> pbase[3];
  6.  
  7. std::auto_ptr<int> b1(new int(1));
  8. std::auto_ptr<int> b2(new int(2));
  9. std::auto_ptr<int> b3(new int(3));
  10.  
  11. pbase[0] = b1;
  12. pbase[1] = b2;
  13. pbase[2] = b3;
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 3424KB
stdin
Standard input is empty
stdout
Standard output is empty