okay, lets say you got an object (an Abstract Data Type using "struct"
or "class"), and you're overloading the operator "=".
object:: &operator=(object temp) // <--- I know I left out some stuff
{
this = temp;
}
isn't that the dumbest thing? I spent an hour trying to figure out
what was wrong with it; the compiler always becomes "evil" whenever
I try to overload an operator.
Comments
: or "class"), and you're overloading the operator "=".
:
: object:: &operator=(object temp) // <--- I know I left out some stuff
: {
: this = temp;
: }
:
: isn't that the dumbest thing? I spent an hour trying to figure out
: what was wrong with it; the compiler always becomes "evil" whenever
: I try to overload an operator.
----> If you cant figure it out, it just recursively calls itself
----> in an endless loop;