摘要: 1:矢量或列表使用迭代器 for (auto pr = scores.begin();pr != scores.end();pr++) cout << *pr; 或 for (auto x : scores) cout << x <<endl; 2:迭代器类型 1)输入迭代器 单向迭代器,可以递增, 阅读全文
posted @ 2020-04-26 19:37 糖糖_彭 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 1:简列 unique_ptr< double [] > pda(new double(5) ); shared_ptr< int > q; auto_ptr< char > c; 2:警告 1)使用NEW分配内存时,才能使用auto_ptr shared_ptr,使用new[]分配内存时,不能使用 阅读全文
posted @ 2020-04-26 18:39 糖糖_彭 阅读(138) 评论(0) 推荐(0) 编辑