最近在看一本C语言的书的时候,书上提到了一个很好的网站,可以对给出的C语言的表达式给出解释。
这个网站叫cdecl.org:http://cdecl.org/
比如:对于表达式:char ** const * const x
给出的解释是:declare x as const pointer to const pointer to pointer to char
对于:declare x as function returning pointer to array 5 of pointer to function returning char
则给出表达式:char (*(*x())[5])() :x是一个函数,该函数的返回值是一个数组指针,数组中的元素是返回值为char的函数指针
对于:char (*(*(*x)())[5])()
给出解释:declare x as pointer to function returning pointer to array 5 of pointer to function returning char
这个对于学习C语言中的函数指针,数组指针,函数指针数组等都很不错。
希望对大家有帮助。