Re: C++ operators 1999 22:34:56 EST." <>

From: Jeremy Elson (
Date: 03/04/99

Maybe I'll de-lurk for once. :-)

Daniel Burke writes:
>ch->points.hit = 10;
>The operator I need would take that, and allow me to have things trigger on
>that assignment.  I think I need something like:
>void operator = (int x, int y);
>But I know that's not exactly what I need for it to only work on a specific
>member variable.  Any help or point in the right direction will be greatly

You can't have it happen for that variable only, unless that variable
is of a unique type (i.e., if you made points.hit be a HitPointType
instead of an int).  Then you could define


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 12/15/00 PST