What is the difference between the following declarations:
int* arr1[8];
int (*arr2)[8];
int *(arr3[8]);
What is the general rule for under
I don't know if it has an official name, but I call it the Right-Left Thingy(TM).
Start at the variable, then go right, and left, and right...and so on.
int* arr1[8];
arr1
is an array of 8 pointers to integers.
int (*arr2)[8];
arr2
is a pointer (the parenthesis block the right-left) to an array of 8 integers.
int *(arr3[8]);
arr3
is an array of 8 pointers to integers.
This should help you out with complex declarations.