Vector的初始化与遍历 - dtor - 博客园
Vector的初始化与遍历std::vector<int> IntTest; for (int i = 0; i < 10; ++i) { IntTest.push_back(i); } for (std::vector<int>::iterator iter = IntTest.begin(); iter != IntTest.end(); ++iter) { std::cout << *iter << std::endl; }