【发布时间】:2015-04-24 18:41:40
【问题描述】:
要遍历 C 风格的多维数组,我们有
int arr[3][4];
for (int row = 0; row < 3; row++){
for (int col = 0; col < 4; col++){
...
}
}
但是如何使用迭代器来迭代以下内容:
array<array<int, 4>, 3> arr;
使用以下迭代器?
array<array<int, 4>, 3>::iterator it1;
array<int, 4>::iterator it2;
【问题讨论】:
标签: arrays class c++11 iteration