pointer to multidimensional array
I'm trying to use a pointer to access an array, since I need to be able to switch between two identically-sized arrays. However, I get compiler errors when I try to reference an array to my pointer. Here is a sample of the code that I have, hopefully someone can tell me what I'm doing wrong.
int grid; //my array
int *grid_ptr; //my pointer
int doSomethingWithGrid(int array); //function prototype
grid_ptr = &grid; //assign pointer to grid, compile error
doSomethingWithGrid(grid_ptr); //func. wont take pointer