摘要: 管理迭代器 –当使用迭代器或指向容器元素的引用时,最小化要求迭代器必须保持有效的程序片段 –由于向迭代器添加元素时或者删除元素的时候可能会使迭代器失效,因此在容器内做插入删除等操作的时必须重新定位迭代器位置对于vector 、deque、string等线性存储结构尤为重要,但是对于链... 阅读全文
posted @ 2015-11-05 18:27 齐庆 阅读(210) 评论(0) 推荐(0) 编辑
摘要: #include#include #include#include #include #includeusing namespace std;int main(int argc, char**argv){ listslist; slist.insert(slist.beg... 阅读全文
posted @ 2015-11-05 02:02 齐庆 阅读(143) 评论(0) 推荐(0) 编辑