you are making the assumption in your code that the array is actually stored 2 dimensionally in memory. it isn't. like i said, it's just a 1D block of memory: row1, row2, etc... go with the code that you got in your first reply.
this should work, but you might have to debug it.
int foo[10][10];yourFunction( foo, 10, 10 );yourFunction ( int *theArray, int width, int height ){ for (int x = 0; x < width; ++x ) { for (int y = 0; y < height; ++y ) { int thisElement = theArray[width * y + x]; } }}
-me
[edited by - Palidine on June 8, 2004 12:52:56 PM]