smart pointer 示例程序
使用方法:
unique_ptr<string> ps1(new string("hello")); shared_ptr<vector<int>> ps2(new vector<int>(3)); //(*ps2).size() = 3;
weak_ptr <vector<int>> ps5(ps2), ps6; //初始化weak_ptr的方法
ps6 = ps2;
shared_ptr<int> ps3 = make_shared<int>(4); //*ps3 = 4;
auto ps4 = make_shared<int>(5); //ps4的类型为 shared_ptr<int>