代码:
#include <iostream>
#include <cstdio>
typedef void (*FUN)();
using namespace std;
void k(){
cout<<"k"<<endl;
}
int main(){
FUN p = NULL;
p = k;
(*p)(); //运行程序
}
输出:
k
2022-01-07 17:50:38
代码:
#include <iostream>
#include <cstdio>
typedef void (*FUN)();
using namespace std;
void k(){
cout<<"k"<<endl;
}
int main(){
FUN p = NULL;
p = k;
(*p)(); //运行程序
}
输出:
k