摘要: 1.shared_ptr,智能指针构造函数是显式的,不能将一个内置指针隐式转换为一个智能指针,必须直接初始化。 shared_ptr<int> p1(new int(42)); shared_ptr<int> p2 = new int (42); //wrong 习题 12.2编写你自己的StrBl 阅读全文
posted @ 2021-05-31 17:10 11YS 阅读(25) 评论(0) 推荐(0) 编辑