[菜农助学交流] 函数指针void BubbleSort( int a[] , int n , int(*compare)( int , int ))

[复制链接]
 楼主| 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

粉丝
快速回复 在线客服 返回列表 返回顶部
个人签名:技术源于积累,成功源于执着!

31

主题

366

帖子

1

粉丝
快速回复 在线客服 返回列表 返回顶部