制作于2018年2月7日
C++11中for的进阶使用
for(int temp : 数组名)
{ cout << temp << " ";
}
可让数组全部输出
for(int& temp : 数组名)
temp = 10;
&引用,可将数组名对应的地址存储里的值通过temp进行修改
for (int& temp : scores){
temp = temp * 2;
遍历数组
新式for循环的用法和改变数组值的用法