Say I have an int, like this:
int foo = 5;
I could then do this:
int bar = -foo; // -5
I want to be able to do the same with my class, so how do I overload the - operator, used as * -1? Do I have to overload the * operator to do so?
-and the*have to do with each other.0 - foo, notfoo * -1.