int * (*p (int))) [3]
Someone asked me what this is today. I look directly at the crazy force ...
Let's do some simple analysis below.
int p; This is the integer variable p
int *p; This is the integer pointer p
int *p[3]; This is an integer pointer array of length 3 p, the element is an integer type pointer
int (*p) [3]; This is an array pointer pointing to an array of integers of length 3
int p (int); This is the function declaration , parameter: integer type, return value: integer type
equal to int p (int x);
int *p (int); This is the function declaration , formal parameter: integer type, return value: integer pointer
equivalent to int *p (int x);
Int (*p) (int); This is a function pointer to a function that has an integer type parameter and an integer type return value.
Int (*p[3]) (int);//This is an array of function pointers , each of which points to a function that has an integer type parameter and an integer type return value
int * (*p (int)); This is a function declaration , parameter: integer, return value: Pointer to integer pointer
equivalent to int **p (int), int **p (int x), int * (*p (int x))
int * (*p (int))) [3]; This is a function declaration , formal parameter: integer type, return value: An array of pointer arrays, pointers within this array, pointing to an array of integer pointers of length 3.
I know this is very round, simply say the return value is this: int *i[x][3]; X is any number
All the above conclusions are tested in VisualStudio2010 and are correct. If I have an omission, or there is nothing to express, please leave a message, Oh, da (づ ̄3 ̄) old.
C-language function pointer array (good to go around)