简体   繁体   English

这个函数的声明

[英]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* . a是一个指向具有两个int类型参数的函数的指针,该函数返回一个char*

The ``Clockwise/Spiral Rule'' “顺时针/螺旋法则”

cdecl: C gibberish ↔ English cdecl: C 胡言乱语 ↔ 英语

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

To make this declaration为了做出这个声明

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

clear use a typedef.明确使用typedef。 For example例如

typedef char * FunctionType( int, int );

FunctionType *a;

That is a is a pointer to the function type char * ( int, int ) .a是指向函数类型char * ( int, int )的指针。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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