C error C2666: 'pow' : 6 overloads have similar conversions

Associate
Joined
14 Jan 2003
Posts
200
Location
NW
Grr anyone any idea why the following code is throwing up this error?

Code:
for(bit=0; bit<C; bit++)
	{
                inphaseR= REC[depth][bit][0];
		quadratR= REC[depth][bit][1];
		if (transition[sf][sto][bit] ==0) inphaseT = -1.0;
		if (transition[sf][sto][bit] ==1) inphaseT = 1.0;
		[B]distances[sf][sto][depth] += pow((inphaseT-inphaseR), 2.0) + pow((quadratT-quadratR), 2.0);[/B] 
	}

there all floats, cant think why :confused:
 
2.0 is a double, 2.0f is a float.
Try casting the arguments to floats or explicitally using the float specialisation of pow(), like : pow<float>(x, y);
 
Back
Top Bottom