I have added the following function to my program:
I want to be able to write:
void RobotTrajectory::operator^(double& RHS)
if (set>2) RHS -= 2*RHS;
and if set is greater than 2, effectively make it
Key = ^sin(alpha)*Kex+ ^cos(alpha)*Key;
otherwise make it:
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:
Key = sin(alpha)*Kex+ cos(alpha)*Key;
error C2059: syntax error : '^'
I have tried writting and I get the same problem.
Please could someone tell me what I am doing wrong!