int ia[3][4] = {0,1,2,3,4,5,6,7,8,9,10,11};
int m,n;
for(int (&a)[4] : ia)
{
for(int &p : a)
cout << p << "-";
cout << endl;
}
for(m = 0; m != 3; ++m)
{
for(n = 0; n != 4; ++n)
cout << ia[m][n] << " ";
cout << endl;
}
for(int (*s)[4] = ia; s !=ia + 3; ++s)
{
for(int *t = *s; t != *s + 4; ++t)
cout << *t << " ";
cout << endl;
}
題 3.43
CP5 多维数组
最新推荐文章于 2020-12-06 05:48:23 发布