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.
Code:int grid[320][240]; //my array int *grid_ptr[][240]; //my pointer int doSomethingWithGrid(int array[][240]); //function prototype int main() { grid_ptr = &grid; //assign pointer to grid, compile error doSomethingWithGrid(grid_ptr); //func. wont take pointer }