Basically what I have is a function which accepts a 2 dimensional array as an argument, I'd like to then be able to create a 2 dimensional pointer to that array. Here's example code:
int main(){
int a[3][3]={0,1,2,3,4,5,6,7,8};
func(a);
}
int func(a[3][3]){
int (*ptr)[3][3]=&a;//this is the problem
}
For some reason this works fine if the array is declared in the function (as opposed to being an argument) but I can't for the life of me figure out how to get around this.