To iterate through a C style multidimentional array we have
int arr[3][4];
for (int row = 0; row < 3; row++){
for (int col = 0; col < 4; col++){
...
}
}
But how may one use iterators to iterate over the following:
array<array<int, 4>, 3> arr;
Using the following iterators?
array<array<int, 4>, 3>::iterator it1;
array<int, 4>::iterator it2;
Aucun commentaire:
Enregistrer un commentaire