c++ 智能指针 #include <memory> //c++11 std::shared_ptr<int> p3(new int); *p3 = 10; cout << "p3:" << *p3 << endl;