errors

Feb 24, 2013 at 4:09am
getting red line under sqrt and atan in c++ 2010


f_mag= sqrt((fx)^2)+((fy)^2);
theta=atan((fx)/(fy));
Feb 24, 2013 at 4:12am
closed account (18hRX9L8)
Well for power use pow() function. Also, make sure that fx and fy are floats. And include <math.h> or <cmath>.
Feb 24, 2013 at 4:19am
atan is correct now but pow is under red line
Feb 24, 2013 at 10:43am
What does your call to pow() look like, and what are the types of the variables or values used? Please show the code.
Feb 24, 2013 at 11:22am
This topic continues from this one:

http://www.cplusplus.com/forum/beginner/93590/


@sweetgirl

How are you getting along with the advice I gave you?

Why are you working out f_mag & theta - you already have those, the assignment is asking for the sum of the X & Y values.
Topic archived. No new replies allowed.