Function 表达式不能用作函数(POW)
我得到一个错误:表达式不能用作双数字2行上的函数它应该是4*2.82*10^-8*长度Function 表达式不能用作函数(POW),function,pow,Function,Pow,我得到一个错误:表达式不能用作双数字2行上的函数它应该是4*2.82*10^-8*长度 double aluminumWireResistance(double length, double wiregauge) { const long double PI=(atan(1)*4); int a; double diam2; double numerator2=((4(2.82*pow(10,-8)))*length); double denominato
double aluminumWireResistance(double length, double wiregauge)
{
const long double PI=(atan(1)*4);
int a;
double diam2;
double numerator2=((4(2.82*pow(10,-8)))*length);
double denominator2= (PI*pow(diam2,2));
a=((36-wiregauge)/39);
diam2=(.127*pow(92,a));
diam2=(diam2/100);
double alumWireResistance=numerator2/denominator2;
return alumWireResistance;
}
你大概是说:
double numerator2=((4(2.82*pow(10,-8)))*length);
只有一个*在4点后丢失
double numerator2=((4 * (2.82*pow(10,-8)))*length);
// ^