O'Reilly logo
  • LI WEI thinks this is interesting:

The argument for using mutator methods is to write additional code before the assignment of a variable to guard the variable from taking on incorrect values. Say, for example, we have a setter for the hp data member, which will look like this:


Cover of Learning C++ by Creating Games with UE4