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