天天看点

指针 种种

f(int (*daytab)[13]){...}

//表明参数是一个指针,它指向具有13个整型元素的一维数组

int *daytab[13]

//申明了一个数组,该数组有13个元素,其中每个元素都是一个指向整型对象的指针

int *f();

//f:是一个函数,它返回一个指向int类型的指针

int (*pf)();

//pf:是一个指向函数的指针,该函数返回一个int类型的对象

char **argv

//argv: pointer to pointer to char

//二维指针

int (*daytab)[13]

//daytab: pointer to array[13] of int

int *daytab[13]

//daytab: array[13] of pointer to int

//int* daytab[13]

//数组元素类型是指向int的指针

void *comp()

//comp: function returning pointer to void

//void* comp()

//函数返回一个指向空的指针

void (*comp)()

//comp: pointer to function returning void

//指针指向该函数,该函数返回void

char (*(*x())[])()

//x: function returning pointer to array[] of pointer to function returning char

//function returning

// pointer to array[] of

// pointer to function returning char

//函数返回一个指向arrary[]的指针

//arrary[]是一个元素类型为指针的数组

//数组里的每个指针指向一个返回类型为char的函数

char (*(*x[3])())[5]

//x: array[3] of pointer to function returning pointer to array[5] of char

//类型为指向函数的指针的array[3]

//函数返回指向类型为char的array[5]的指针 

继续阅读