5.5c++:shared_ptr使用場景,陷阱、性能分析,使用建議(轉載)

shared_ptr使用場景 #include <iostream> #include <vector> #include <memory> using namespace std; shared_ptr <int> create(int value) { return make_shared<int> (value);//返回一個shared_ptr } //void myfunc(i
相關文章
相關標籤/搜索