摘要:
输入流迭代器 表:标准模板库中为双向链表 表的使用 定义包含Point对象的容器:list<Point> pts(8); 插入:pts.insert(pts.begin(),Point(1,2)); 表头插入:pts.push_front(Point(1,2)); 插入:pts.insert(pts 阅读全文
posted @ 2017-01-07 22:32
Worty
阅读(236)
评论(0)
推荐(0)
摘要:
调用标准模板库的find()函数查找数组元素 例子: 向量迭代器 使用向量迭代器操作向量 常迭代器 若不想通过迭代器修改目标对象值,定义迭代器常量 例子: const vector<int>::iterator it; 非法操作:*it = 10;//不能修改常迭代器指向的对象 流迭代器 使用迭代器 阅读全文
posted @ 2017-01-07 21:27
Worty
阅读(211)
评论(0)
推荐(0)
浙公网安备 33010602011771号