c++ 智能指针

#include <memory>  //c++11

std::shared_ptr<int> p3(new int);

*p3 = 10;

cout << "p3:" << *p3 << endl;
原文地址:https://www.cnblogs.com/nanfei/p/11806047.html