StackOverflow 文件 C++ 教程 迭代 基於範圍的迴圈 基於範圍的迴圈 Created: November-22, 2018 std::vector<int> primes = {2, 3, 5, 7, 11, 13}; for(auto prime : primes) { std::cout << prime << std::endl; } 而