If you are worrying about the use of multidimensional arrays, there is an article in these forums that discusses their use. I believe you will find some answers to your question there.
Thanks for your answers to my posts! Meanwhile, by using dynamic memory (using an array of pointers to arrays), I was able to overcome the problem. Perhaps, this very technique (using an array of pointers to arrays) can be applied to static memory.
STL containers could be used rather than arrays. In that case you would not have to explicitly designate the sizes and could traverse the containers using iterators. Both vectors and deques provide random access.
Just make sure to pass it to your function by pointer (or reference), so that it can be modified.