Hi,
I have added the following function to my program:
I want to be able to write:Code:void RobotTrajectory::operator^(double& RHS) { if (set>2) RHS -= 2*RHS; }
and if set is greater than 2, effectively make itCode:Key = ^sin(alpha)*Kex+ ^cos(alpha)*Key;
otherwise make it:Code:Key = -sin(alpha)*Kex+ (-cos(alpha)*Key);
The program runs fine as long as I don'y try to use my overloaded operator. If I do it throws the following error:Code:Key = sin(alpha)*Kex+ cos(alpha)*Key;
error C2059: syntax error : '^'
I have tried writtingand I get the same problem.Code:Key = ^3.124
Please could someone tell me what I am doing wrong!
thanks,
Leon



LinkBack URL
About LinkBacks


