Foreach loop (or for each loop) is a control flow statement for traversing items in a ... The syntax is similar to that of Java: #include <iostream> int main() { int myint[] = {1, 2, 3, 4, 5}; for (int i : myint) { std::cout << i << '\n'; } }.
確定! 回上一頁