C声明中的指针
参考
http://www.cdecl.org/
http://unixwiz.net/techtips/reading-cdecl.html
指针
int i; declare i as int
const int i; declare i as const int
----------
int * p; declare p as pointer to int
int ** p; declare p as pointer to pointer to int
int *** p; declare p as pointer to pointer to pointer to int
const int * p; declare p as pointer to const int
const int ** p; declare p as pointer to pointer to const int
const int *** p; declare p as pointer to pointer to pointer to const int
int * const p; declare p as const pointer to int
int ** const p; declare p as const pointer to pointer to int
int *** const p; declare p as const pointer to pointer to pointer to int
const int * const p; declare p as const pointer to const int
const int ** const p; declare p as const pointer to pointer to const int
const int *** const p; declare p as const pointer to pointer to pointer to const int
int * const * p; declare p as pointer to const pointer to int
int * const ** p; declare p as pointer to pointer to const pointer to int
int * const *** p; declare p as pointer to pointer to pointer to const pointer to int
int ** const * p; declare p as pointer to const pointer to pointer to int
int *** const * p; declare p as pointer to const pointer to pointer to pointer to int
const int * const * p; declare p as pointer to const pointer to const int
int ** const * const p; declare p as const pointer to const pointer to pointer to int
const int ** const * const p; declare p as const pointer to const pointer to pointer to const int
----------
int a[]; declare a as array of int
int a[10]; declare a as array 10 of int
int a[10][15]; declare a as array 10 of array 15 of int
int *a[10]; declare a as array 10 of pointer to int
int **a[10]; declare a as array 10 of pointer to pointer to int
int ***a[10]; declare a as array 10 of pointer to pointer to pointer to int
int *a[10][15]; declare a as array 10 of array 15 of pointer to int
int **a[10][15]; declare a as array 10 of array 15 of pointer to pointer to int
int ***a[10][15]; declare a as array 10 of array 15 of pointer to pointer to pointer to int
int (*a)[10]; declare a as pointer to array 10 of int
int (**a)[10]; declare a as pointer to pointer to array 10 of int
int (***a)[10]; declare a as pointer to pointer to pointer to array 10 of int
int (*a)[10][15]; declare a as pointer to array 10 of array 15 of int
int (**a)[10][15]; declare a as pointer to pointer to array 10 of array 15 of int
int (***a)[10][15]; declare a as pointer to pointer to pointer to array 10 of array 15 of int
int *(*a)[]; declare a as pointer to array of pointer to int
int **(*a)[]; declare a as pointer to array of pointer to pointer to int
int ***(*a)[]; declare a as pointer to array of pointer to pointer to pointer to int
int *(**a)[]; declare a as pointer to pointer to array of pointer to int
int *(***a)[]; declare a as pointer to pointer to pointer to array of pointer to int
----------
int f(); declare f as function returning int
int * f(); declare f as function returning pointer to int
int ** f(); declare f as function returning pointer to pointer to int
int *** f(); declare f as function returning pointer to pointer to pointer to int
int f(int); declare f as function (int) returning int
int * f(int); declare f as function (int) returning pointer to int
int ** f(int); declare f as function (int) returning pointer to pointer to int
int *** f(int); declare f as function (int) returning pointer to pointer to pointer to int
int (*f) (int); declare f as pointer to function (int) returning int
int (**f) (int); declare f as pointer to pointer to function (int) returning int
int (***f) (int); declare f as pointer to pointer to function (int) returning int
int * (*f) (int); declare f as pointer to function (int) returning pointer to int
int ** (*f) (int); declare f as pointer to function (int) returning pointer to pointer to int
int *** (*f) (int); declare f as pointer to function (int) returning pointer to pointer to pointer to int
----------
int *(*(**foo[][8])())[]; declare foo as array of array 8 of pointer to pointer to function returning pointer to array of pointer to int
int *(*(**foo[5][8])())[]; declare foo as array 6 of array 8 of pointer to pointer to function returning pointer to array of pointer to int
----------