Last edited on
Start here:

After reading that, let us know if you have more questions. That should answer your question. There are several existing articles and threads about multi-dimensional arrays. If you search the site, you will find a few useful threads of discussion.
I've read that but don't understand how to input it one row per function call
If you are a beginner, then using a vector will be a lot easier.

The previous tutorial should explain the concept of array elements so you could try it using pointer arithmetic as well but it is harder to grasp. I have always found pointer arithmetic with 2d arrays to be complex. With vector you have more of an array of containers. Each element of the vector array is another vector which could easily be passed by reference to your function.

To use pointers follow the above article to pass in the pointer to the array, and then you can pass in values indicating how to offset for the current row. You could probably do it using a start and end pointer and use pointer arithmetic but I don't have time to figure that out right now. I have not done that in a long time myself so I'd have to test an example before trying to explain. Hopefully something up above will get you going in the right direction.
Topic archived. No new replies allowed.