程序是数据和指令的集合
函数指针,函数名是函数在内存中的地址,在C语言中字符串是用字符指针来表示,所以方法的参数是字符指针
int msg(char* msg,char* title){
MessageBox(0,msg,title,0);
return 0;
}
void main(){
int (*fun_p)(char* msg,char* title) = msg;
fun_p("消息内容","标题");
getChar();
}
int add(int a,int b){
return a + b;
}
int minus(int a, int b){
return a- b;
}
void msg(int(*func_p)(int a, int b),int m, int n){
int r = func(m,n);
}
void main(){
msg(add,10,20);
}