我的代码如下:
#include <iostream>
using std::cout;
using std::endl;
int next(int n)
{
return n + 1;
}
int main()
{
int next(int); // function declaration
int *fp = &next;
int temp = 10;
temp = (*fp)(temp);
cout << temp << endl;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
编译器点int *fp = &next;需要调试,但是,我没有发现这句话有什么问题.你能告诉我吗?谢谢你的时间~~