Hi all,

Can anyone help me with the following problem:

I want to cycle through a multidimensional matrix M.

Suppose this matrix has dimension 2 with boundaries aa and bb, then I could use something like this:

But now, suppose that at compile time I don't now the dimensions nor the boundaries of matrix M!Code:for(a=0; a<aa; a++) { for(b=0; b<bb; b++) { M[a][b] = ...; } }

I want to write some kind of general code that can cope with all possible dimensions of the matrix. So, if the matrix has dimension three, the code will automatically add a third 'for' loop.

Is this possible or should I do this completely different?

Thanks in advance!

Bropolwig