#include
Float _calculate (float (* fun) (float), float m);
Int one (int x);
Int main ()
{
Float left, right, root, result, fleft, fright, x;
The scanf (" % f, % f ", & amp; Left, & amp; Right);
Fleft=_calculate (one, left);
Fright=_calculate (one, right);
Printf (" % d, % d ", fleft, fright);
}
Float _calculate (float (* fun) (float), float m)
{
Return (* fun) (m);
}
Int one (int x)
{
Return (* * x x x - x - 1);
}
I want to use a pointer variable why not
CodePudding user response:
You this is one of the parameters and return values are int, unlike function Pointers to define, it is floatCodePudding user response:
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html