如何解释这个声明 [英] How to interpret this declaration

查看:69
本文介绍了如何解释这个声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一些头文件中找到了以下声明。

有人可以帮我解释一下吗?


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

提前任何帮助的Thanx ....

I found the following declaration in some header file.
Can somebody help me how to interpret this ?

void (*signal( int sig, void (*function)(int)) (int) );
Thanx for any help in advance ....

推荐答案

ju**********@yahoo.co.in 写道:
我在一些头文件中找到了以下声明。
有人可以帮我解释一下吗?

void(* signal( int sig,void(* function)(int))(int));
I found the following declaration in some header file.
Can somebody help me how to interpret this ?

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




Google for:如何理解函数原型信号

消息ID:< 35 ************* @ individual.net>


-

Stan Tobias

mailx`echo si***@FamOuS.BedBuG.pAlS.INVA LID | sed s / [[:upper:]] // g`



Google for: "How to understand function prototype signal"
Message-ID: <35*************@individual.net>

--
Stan Tobias
mailx `echo si***@FamOuS.BedBuG.pAlS.INVALID | sed s/[[:upper:]]//g`


这是函数signal的标准定义。


声明声明一个标准函数(signal)将一个指针

返回给一个带有int参数但没有返回的函数,而函数

信号也有两个参数,一个其中是一个整数,另一个是
a函数指向一个带有int参数但没有返回的函数。


问候,

Kenneth

That is a standard definition of funcition "signal".

The statment declares a standard function(signal) returning a pointer
to a function with an int parameter without return and the function
signal also has two parameters, one of which is an integer, another is
a function pointer to a function with a int parameter without return.

Regards,
Kenneth




ju ********** @ yahoo.co.in 写道:
我在一些头文件中找到了以下声明。
可以有人帮我解释了这个吗?

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

Thanx任何帮助提前....
I found the following declaration in some header file.
Can somebody help me how to interpret this ?

void (*signal( int sig, void (*function)(int)) (int) );
Thanx for any help in advance ....



嗯,这有点困难。信号功能是POSIX之一。

''信号l''返回一个指向函数的指针。这个函数

是''void''类型,并且有一个int的序列。另外,''signal''是一个

函数,它有两个para,一个是int,另一个也是一个指针

指向一个函数。这个函数不是上面那个函数,它有

一个int para并且是''void''类型。

哦,头晕......


Hmm,it is a little difficult.The signal functions is one of POSIX.
The ''signal'' returns a pointer which points to a function.This function
is of ''void'' type and has a para of int.Also,the ''signal'' IS a
function,it has two paras,one is int and the other is also a pointer
pointing to a function.This function is not that function above,it has
an int para and is of ''void'' type.
Oh,dizzy...


这篇关于如何解释这个声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆