gpt4 book ai didi

c - 我对吗 ? -C表达式

转载 作者:太空狗 更新时间:2023-10-29 15:45:29 26 4
gpt4 key购买 nike

int *(*(*P)[2][2])(int,int);

P 是一个指向 2x2 指针数组的指针,该指针指向一个函数,该函数具有 2 个类型的 int 参数,返回一个 int 类型的指针。这是正确的吗?

最佳答案

cdecl是解决这类问题的好工具:

$ cdecl
Type `help' or `?' for help
cdecl> explain int *(*(*P)[2][2])(int,int);
declare P as pointer to array 2 of array 2 of pointer to function (int, int) returning pointer to int

是的,你是对的。

关于c - 我对吗 ? -C表达式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4915507/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com