Format file

This commit is contained in:
laialaodi 2023-02-28 20:40:27 +08:00
parent f77602f2dd
commit 2657e410aa

View File

@ -12,22 +12,22 @@ using namespace std;
/**
* @brief pFunint的函数的指针
*/
void (*pFun)(int);
void (*pFun)(int);
/**
* @brief pFun不一样
*/
typedef void (*func)(void);
typedef void (*func)(void);
void myfunc(void)
{
cout<<"asda"<<endl;
}
void glFun(int a){ cout<<a<<endl;}
void glFun(int a){ cout<<a<<endl;}
int main(){
func pfun = myfunc;/*赋值*/
pfun();/*调用*/
pFun = glFun;
(*pFun)(2);
func pfun = myfunc;/*赋值*/
pfun();/*调用*/
pFun = glFun;
(*pFun)(2);
}