Home > Software engineering >  The error C2893: failed to make a function template customization solutions
The error C2893: failed to make a function template customization solutions

Time:09-17

Written in MFC dialog application today, with the accumulate function accumulative sum on the list of the numeric, finally to debug the error,
Which involved in calculation of parameters for all floating-point
My question:
What is a function template?
_Ty1 & amp; & , _Ty2 & amp; & On behalf of what?
The solution?



 for (t=0; T & lt;=4; T++) 
{
Cx=(line [1] [t] * sin (syfwj [1] [t]));
Cy=(line [1] [t] * cos (syfwj [1] [t]));
Gaizhengshu2=line [1] [t] * ((the accumulate (sycx sycx + 6, 0.0) - chazhi2)/(the accumulate (line, the line + 6, 0.0)));
Gaizhengshu3=line [1] [t] * ((the accumulate (sycy sycy + 6, 0.0) - chazhi3)/(the accumulate (line, the line + 6, 0.0)));
Sycx [1] [t]=cx.
Sycy [1] [t]=cy;
Sygaizhengshu2 [1] [t]=gaizhengshu2;
Sygaizhengshu3 [1] [t]=gaizhengshu3;
}

 _Ty _Accumulate (_InIt _First, _InIt _Last, _Ty _Val, _Fn2 _Func) 
{//return the sum of _Val and all in [_First _Last), using _Func
for (; _First!=_Last; + + _First)
_Val=_Func (_Val, * _First);
Return (_Val);
}
  • Related