简体   繁体   English

了解函数指针声明

[英]Understanding function pointer declaration

I have to describe the following code: 我必须描述以下代码:

    char *(**f[][]) ();

I understand the "char *" at the beginning and the "()" at the end: It's a function which doesn't have arguments and returns a pointer to char. 我理解开头的“ char *”和结尾的“()”:这是一个没有参数并返回指向char的指针的函数。 But what does " ( * * f [ ][ ] ) " mean? 但是“(* * f [] [])”是什么意思?

Can anyone help me please? 谁能帮我吗? Thanks =D 谢谢= D

There's a very useful website you might want to know about: http://cdecl.org/ 您可能想知道一个非常有用的网站: http : //cdecl.org/

declare f as array of array of pointer to pointer to function returning pointer to char 将f声明为指向函数指针的数组,返回指向char的指针

In a bit easier to read english, f is a 2d array of pointers to function pointers, that return strings (or pointers to characters). 用英语更容易理解, f是指向函数指针的二维数组,返回字符串(或指向字符的指针)。

Quite why you'd need that I have no idea. 相当为什么您需要我一无所知。

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

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