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
相關文章
相關標籤/搜索