Introduction to Programming and C++

Contents Previous Topic Next Topic

A mutator is any member function which is expected to change the internal state of the object on which it is called. Unfortunately, this classification is 0-1: either a member function is an accessor (declared by appending const to the declaration) or it is a mutator. It is not possible to restrict changes to just, for example, one member variable of an object.


Contents Previous Topic Top Next Topic