简体   繁体   中英

The declaration of this function

how to explain this right

char*(*a)(int, int);

just explain what does this declaration means. I'm not sure how to explain it right. Thank you very much!

a is a pointer to a function with two parameters of type int that returns a char* .

The ``Clockwise/Spiral Rule''

cdecl: C gibberish ↔ English

像这样: a是一个指向函数的指针,它接受两个int参数并返回指向char指针。

To make this declaration

char*(*a)(int, int);

clear use a typedef. For example

typedef char * FunctionType( int, int );

FunctionType *a;

That is a is a pointer to the function type char * ( int, int ) .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM