Utility Room
That takes care of the main program. Now let's take a look at the HomeUtility class, starting with its interface, shown in Figure 13.5.
Figure 13.5. The HomeUtility interface (code\hmutil1.h)
This class is different from any of the others we've seen so far, as it consists entirely of public static member functions and a public enum. You may reasonably wonder why this is even a class at all; why not just make these functions global?
The reason is to avoid polluting the global name space. That is, it's entirely possible that another programmer might write a function called HandleError, and we want to make sure that the code we write ...
Get Learning to Program in C++ now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.