1133人加入学习
(5人评价)
C++编程系列 第一季编程基础

制作于2018年2月7日

价格 免费
课程还未发布,不允许加入和购买

C++11中for的进阶使用

for(int temp : 数组名)

{
      cout << temp << " ";

}

可让数组全部输出

for(int& temp : 数组名)

{
      cout << temp << " ";

      temp = 10;

}

&引用,可将数组名对应的地址存储里的值通过temp进行修改

[展开全文]

for (int& temp : scores){

   temp = temp * 2;

}

遍历数组

[展开全文]

新式for循环的用法和改变数组值的用法

[展开全文]

授课教师

加我的QQ问问题:804632564

课程特色

下载资料(1)
视频(58)