1. std::begin、std::end函数的用法
1 #include <iostream> 2 #include <vector> 3 using namespace std; 4 5 int main() { 6 vector<int> v{1, 2, 3, 4, 5, 6}; 7 for (auto iter = std::begin(v); iter != std::end(v); ++iter) { 8 std::cout << *iter; 9 } 10 return 0; 11 }