Hello again. I don't know what is wrong with the following equation, but I keep getting this error message.
Error 4 error C2676: binary '-' : 'Vector' does not define this operator or a conversion to a type acceptable to the predefined operator
These are where the types come fromCode:F*=G*((bodies[i].m*bodies[i++].m)/(sqrt((bodies[i].r.x-bodies[i++].r.x)*(bodies[i++].r.x-bodies[i].r.x)+(bodies[i++].r.y-bodies[i].r.y)*(bodies[i++].r.y-bodies[i].r.y))*sqrt((bodies[i++].r.x-bodies[i].r.x)*(bodies[i++].r.x-bodies[i].r.x)+(bodies[i++].r.y-bodies[i].r.y)*(bodies[i++].r.y-bodies[i].r.y))*sqrt((bodies[i++].r.x-bodies[i].r.x)*(bodies[i++].r.x-bodies[i].r.x)+(bodies[i++].r.y-bodies[i].r.y)*(bodies[i++].r.y-bodies[i].r.y))))*(bodies[i++].r-bodies[i].r);
I'm lost as to what that error is from. Thanks.Code:typedef struct { double x; double y; } Vector; typedef struct { Vector r; Vector v; double m; char name[MAX_NAME]; } Body;