Quote Originally Posted by taurus View Post
[CODE]I did that but still doesnt seem to be happy with the passing of the array?
It basically never makes sense to take the address of an array; it wont help you. You MUST change the structure of the array you are passing if the function prototype is for a pointer-to-a-pointer-of-ints.
It doesn't matter how many []'s are involved in declaring your array, it's still in one chunk of memory. e.g. These would be stored the same way in memory:
Code:
int a[2][2][2] = {{{1,2},{3,4}},{{5,6},{7,8}}};
int a[8] = {1,2,3,4,5,6,7,8};
And in fact you can initialise the first one like this too I believe, showing they're the same:
Code:
int a[2][2][2] = {1,2,3,4,5,6,7,8};
To structure it as double-pointers, you need to have an array of pointers, that point to arrays of ints. Someone earlier posted an example that declared an array of pointers into the array of ints, and you could then pass that array of pointers. You just have to go back and find the correct post. Otherwise you have to create that array of pointers and then use malloc to create each sub-array.