gpt4 book ai didi

c - 我如何在 C 中阅读这个复杂的声明?

转载 作者:太空狗 更新时间:2023-10-29 16:30:01 25 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
what's the meaning of this piece of code? void (*signal(int sig, void (*func)(int)))(int);

我有一个从“signal.h”头文件中获取的复杂声明,下面是声明。

  void (*signal(int sig, void (*func)(int)))(int);

现在,我该如何解析它?作为

signal is function taking two arguments ‘sig’ of int type and ‘func’, which is a pointer to a function taking int as an argument and returns void type; it returns a pointer to the function taking int as argument and returning void.

可以吗还是signal是指向函数的指针?

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