STL vector的使用(三)遍历
来源:互联网 发布:apache ab get参数 编辑:程序博客网 时间:2024/06/01 08:08
一. vector的遍历总类:
1. 未用名字空间,使用vector 进行遍历:
for(std::vector<std::string>::size_type index = 0; index < vect.size();index++){std::cout << vect[index] << std::endl;}
2. 使用名字空间,使用vector进行遍历:
for(int index = 0; index < vect.size();index++){cout << vect[index] << endl;}
3. 利用迭代器,对vector进行遍历:
vector<string>::iterator it = vect.begin();for(;it != vect.end();it++){cout << *it << endl;}
1 0
- STL vector的使用(三)遍历
- STL之vector的使用二(vector的遍历)
- STL(三)vector复杂对象的创建及遍历
- STL之vector的使用三(vector的删除)
- C++ stl使用之vector的基本使用和遍历
- STL Vector 的遍历删除
- STL Vector 的遍历删除
- STL的vector使用
- STL之vector的使用
- STL之vector的使用
- STL------vector的简单使用
- STL之vector的使用
- STL之vector的使用
- STL之vector的使用
- STL之vector的使用
- STL之vector的使用
- STL 向量(vector)的使用
- C++ Stl的Vector使用
- HDU 5288 OO’s Sequence (2015 MUT#1 数学+质因子分解)
- iOS工程适配64-bit经验分享
- android 学习笔记 数据存储到文件中
- 鼓励自己成为一名合格程序设计师
- UI_NavigationController
- STL vector的使用(三)遍历
- json
- 封装类之CSplashWnd(应用程序的启动画面)
- 基于栈的一些操作
- codeforces 498C C. Array and Operations(最大流+数论)
- 在运行期通过反射了解JVM内部机制
- MFC 车牌识别 小学期作业 part4
- Linux学习记录(5)Vi编辑器基本使用
- 快速排序