'fsimp' : cannot convert parameter 4 from 'double (double)' to 'double (__cdecl *)(double)'
这个是求积分的 函数
double CDIALOG1::fsimp(double a,double b,double eps,double (*P)(double))
{
int n,k;
double h,t1,t2,s1,s2,ep,p,x;
n=1; h=b-a;
t1=h*(P(a)+P(b))/2.0;
s1=t1;
ep=eps+1.0;
while (ep>=eps)
{
p=0.0;
for (k=0;k<=n-1;k++)
{
x=a+(k+0.5)*h;
p=p+P(x);
}
t2=(t1+h*p)/2.0;
s2=(4.0*t2-t1)/3.0;
ep=fabs(s2-s1);
t1=t2; s1=s2; n=n+n; h=h/2.0;
}
return(s2);
}
我调用他的时候
double a,b,c,eps;
a=(3/11);
b=(10.3/11);
c=(22/11);
eps=0.0000001;
m_e1=fsimp(a,b,eps,fun_1);
fun_1函数
double CDIALOG1::fun_1(double x)
{
return(m_sf1*pow(x,3)*2.04/6.7*pow(11*x/6.7,1.04)*pow(2.718,-pow(11*x/6.7,2.04)));
}
出现上面这个错误是怎么回事啊