实战c++中的智能指针unique_ptr系列-- 使用std::unique_ptr代替new operator(错误:‘unique_ptr’ is not a member of ‘std’)

写了不少篇关于vector的博客,其实vector很便捷,也很简单。可是不少易错的问题都是vector中的元素为智能指针所引发的。因此决定开始写一写关于智能指针的故事,尤为是unique_ptr指针的故事。ios 这是个开始,就让咱们使用std::unique_ptr代替new operator吧!web 仍是用程序说话:编辑器 #include<iostream> int main() {
相关文章
相关标签/搜索