📜  c++ for in - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:55.414000             🧑  作者: Mango

代码示例2
array values = {1, 2, 3, 4, 10};
// the type declaration below must be consistent with the array type
for (int x : values){ //we use a colon instead of in
cout << x << endl;
}