Is there a way to iterate over an n-dimensional array (where n is variable) without using recursion? I’m using C++ at the moment, but I guess an answer in almost any language would do.
EDIT: Actually my real question is a bit different: I actually want to enumerate the indices of the array. Simple 2D example, with a 2×2 array: 0,0; 0,1; 1,0; 1,1.
1 Answer