函数指针
来源:互联网 发布:建筑图纸设计软件 编辑:程序博客网 时间:2024/06/07 04:06
#include <iostream>//#include <cstring>using namespace std;void reset(int a[], int n){//menset(a, 0, sizeof(int)*n);for (int i=0; i<n; i++){a[i] = 0;}}void output(int a[], int n){for (int i=0; i<n; i++)cout << a[i] << ' ';cout << endl;}int main(){void (*fp)(int a[], int n)=NULL;int x[5]={1, 2, 3, 4, 5};fp = reset;fp(x, 5);fp = output;fp(x, 5);return 0;}
阅读全文
0 0
- 指针函数 函数指针
- 函数指针/指针函数
- 指针函数&函数指针
- 函数指针 指针函数
- 函数指针 指针函数
- 指针函数,函数指针
- 函数指针,指针函数,
- 指针函数,函数指针
- 函数指针 指针函数
- 函数指针、指针函数
- 指针函数&函数指针
- 函数指针 指针函数
- 函数指针 指针函数
- 函数指针&指针函数
- 指针函数 函数指针
- 指针函数 &函数指针
- 函数指针&指针函数
- void指针 函数指针
- POJ 3984 迷宫问题 手写队列+BFS路径输出
- HDU 3974 Assign the task(DFS建树+线段树)
- 欢迎使用CSDN-markdown编辑器
- 【lower_bound】【upper_bound】二分查找
- 集训8.9
- 函数指针
- 匿名对象和匿名类
- [Codeforces 590E] Birthday
- 凸包模板
- oracle单引号和双引号的区别
- 接口与多态
- Truck History(最小生成树)
- 自己初步了解python数据爬虫
- Hdu 4003 Find Metal Mineral 树型背包DP