August 2002
Beginner
1122 pages
22h 1m
English
That takes care of the main program. Now we're going to take a look at a number of functions that have something in common but really don't constitute a class, as they don't share any data. It would be possible to use a class for grouping these functions, but there's a better way: creating a namespace to hold these functions. Of course, we've been using the std namespace throughout this book, but up until now we haven't made one of our own.[5] It's not terribly difficult, as you'll see. Let's start by taking a look at the HomeUtility namespace, starting with its interface, shown in Figure 13.5.
[5] Actually, this isn't quite correct. As I mentioned earlier, since every scope (and therefore every class ...
Read now
Unlock full access