在C语言中使用函数指针有什么用? [英] What is the use of Function Pointers in C language?

查看:65
本文介绍了在C语言中使用函数指针有什么用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友,


c语言中函数指针的用途是什么?

有用吗?

用简单的例子讲一下......?

请帮助我。

Hi friend,

what is the use of function pointer in c language and where it is
useful?
tell with simple example...?
plz help me.

推荐答案

tn ******* @ gmail.com 写道:

嗨朋友,


c语言中函数指针的用法是什么?

有用吗?

告诉简单例子......?

plz帮助我。
Hi friend,

what is the use of function pointer in c language and where it is
useful?
tell with simple example...?
plz help me.



plz不再在这里发布了。

函数指针有很多用途。它们用于实现通用的

函数,如qsort(),回调函数,状态机和其他任何运行的函数

函数的时间绑定是必需的。


-

Ian Collins。

plz doesn''t post here any more.

Functions pointers have many uses. They are used to implement generic
functions like qsort(), callbacks, state machines and anywhere else run
time binding of a function is required.

--
Ian Collins.


2月20日晚上8:04,tnowle ... @ gmail。 com写道:
On Feb 20, 8:04 pm, tnowle...@gmail.com wrote:

朋友,


c语言中函数指针的用法是什么? />
有用吗?

告诉简单的例子......?

plz帮助我。
Hi friend,

what is the use of function pointer in c language and where it is
useful?
tell with simple example...?
plz help me.



在排序中,我们可以将比较函数传递给排序例程,并且
对任何数据类型都有完全一般的排序。请参阅:
http://www.hmug.org/ man / 3 / qsort.php


In sorting, we can pass a comparison function to a sort routine and
have a completely general sort for any data type. See:
http://www.hmug.org/man/3/qsort.php


2月20日晚上8:19,Ian Collins< ian-n ... @ hotmail.com写的:
On Feb 20, 8:19 pm, Ian Collins <ian-n...@hotmail.comwrote:

tnowle ... @ gmail.com写道:
tnowle...@gmail.com wrote:

你好朋友,
Hi friend,


c语言中函数指针的用法是什么?

有用吗?

用简单的例子讲述......?

plz帮助我。
what is the use of function pointer in c language and where it is
useful?
tell with simple example...?
plz help me.



plz不再在这里发布了。


plz doesn''t post here any more.



他将如何学习呢?


我希望他们不要希​​望海报消失将

改善。有时他们会这样做。

How''s he going to learn then?

Rather than hoping that posters go away, I hope that they will
improve. Sometimes they do.


函数指针有很多用途。它们用于实现通用的

函数,如qsort(),回调函数,状态机和其他任何运行的函数

函数的时间绑定是必需的。


-

Ian Collins。
Functions pointers have many uses. They are used to implement generic
functions like qsort(), callbacks, state machines and anywhere else run
time binding of a function is required.

--
Ian Collins.



这篇关于在C语言中使用函数指针有什么用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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