如何调用一个名称与调用函数中的局部变量名称相同的函数
场景:
我需要从其他函数otherfun(int a,int myfun)调用函数myfun(a,b).我该怎么做?
int myfun(int a , int b)
{
//
//
return 0;
}
int otherfun(int a, int myfun)
{
// Here i need to call the function myfun as .. myfun(a,myfun)
// how can i do this?? Please help me out
}
Run Code Online (Sandbox Code Playgroud)
int myfun(int a , int b)
{
return 0;
}
int myfun_helper(int a, int b)
{
return myfun(a,b);
}
int otherfun(int a, int myfun)
{
/* the optimizer will most likely inline this! */
return myfun_helper(a,myfun);
}
Run Code Online (Sandbox Code Playgroud)