c++中的四个智能指针

C++里面的四个智能指针: auto_ptr, shared_ptr, weak_ptr, unique_ptr 其中后三个是c++11支持,而且第一个已经被11弃用:c++ auto_ptr(c++98的方案,cpp11已经抛弃)   采用全部权模式。 auto_ptr< string> p1 (new string ("I reigned lonely as a cloud.”)); au
相关文章
相关标签/搜索