码迷,mamicode.com
首页 > 其他好文 > 详细

练习3.43

时间:2016-09-08 22:56:07      阅读:120      评论:0      收藏:0      [点我收藏+]

标签:

#include<iostream>
using namespace std;

int main()
{
	int ia[2][3] = { 1, 2, 3, 4, 5, 6 };
//数组下标略	
	
        for (int (&i)[3] : ia)
		for (int &j : i)
			cout << j << endl;

	for (int (*i)[3] = begin(ia); i != end(ia); i++)
		for (int *j = begin(*i); j != end(*i); j++)
			cout << *j << endl;

	return 0;
}

  

练习3.43

标签:

原文地址:http://www.cnblogs.com/KennyRom/p/5854574.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!