标签:iter color span back 指针 class ack ace \n
#include<iostream> #include<vector> using namespace std; int main() { vector<int> nums; nums.push_back(3); nums.push_back(4); vector <int>::iterator iter=nums.begin(); while(iter!=nums.end()) { cout<<*iter<<"\n"; iter++; } }
迭代器本身是指针,向量也可以按照数组来访问。
标签:iter color span back 指针 class ack ace \n
原文地址:https://www.cnblogs.com/yuhaowang/p/10410310.html