打印
[菜农助学交流]

函数指针void BubbleSort( int a[] , int n , int(*compare)( int , int ))

[复制链接]
1854|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
tao560532|  楼主 | 2011-9-17 18:45 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 tao560532 于 2011-9-17 18:56 编辑

void BubbleSort( int a[] , int n , int(*compare)( int , int ))
这是啥么定义函数的里面的那个 int(*compare)( int , int ))
看不懂程序,

相关帖子

沙发
tao560532|  楼主 | 2011-9-17 18:57 | 只看该作者
现在看来int(*compare)( int , int ))这个只是在这确定一个位置,在调用 BubbleSort函数将里面的compare名字换成要调用的函数名即可以实现函数指针作为函数参数使用了,

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:技术源于积累,成功源于执着!

31

主题

366

帖子

1

粉丝