Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In this chapter, we looked at the use of C++ classes as a program-building tool. The use of classes eliminates the drawbacks of using global functions as the tools of object-oriented programming.
The first drawback of using global functions is that it does not necessarily indicate to the maintainer what the designer knows at the time of coding, that the functions accessing the same data structure logically belong together.