2019年4月2日

C++——list中erase和remove的区别

摘要: 1.之前在做相关的操作的时候,涉及到清除list相关的元素,因此会用到erase和remove,那么二者有什么区别呢? 从官方文档中,我们可以获取以下信息 erase : 说明:Removes from the list container either a single element (posi 阅读全文

posted @ 2019-04-02 16:19 陶大先生 阅读(11600) 评论(0) 推荐(0)

C++——智能指针shared_ptr的实现

摘要: 但是我实现到release方法的时候,并不能满足需求。因为release方法的要求是,交出对象的控制权,然后智能指针指向null;Releases ownership of its stored pointer, by returning its value and replacing it wit 阅读全文

posted @ 2019-04-02 13:40 陶大先生 阅读(3276) 评论(0) 推荐(0)

导航