I have problems with array pointers in c/objective c. When I execute my code I get a BAD ACCESS error message. I nailed down the statement that crashes the app:
unsigned char *image[640][480][4];
If I change the statement to:
unsigned char *image[640][10][4];
the program doesn't crash.
This statement crashes the app as well:
unsigned char *bla[1000][180];
Any idea why the size of the array causes the crash to occur? This is just a declaration of an array pointer.
I'm running Xcode 4.2.1 with IOS 5 target.
mallocinstead, out of curiosity?char (*image)[640][480][4]- this is a pointer to a three dimensional array. You declared a three dimensional array of pointers.