#include <iostream> #include <vector> using namespace std; int main() { vector<int> Srr(10, 5); for (auto it = Srr.begin(); it != Srr.end() && !(*it).empty(); //(error) 直到处理完所有整型或者遇到某个空元素停止 ++it) { (*it) = (*it) * 2; cout << (*it) << " "; } system("pause"); return 0; }
相关分类