Controlling Data with Access Modifiers
C++ allows you to control how data in variables can be accessed by using different access modifiers. There are modifiers that tell the compiler that a variable should be shared among classes or that the program cannot change the value of the variable after it has been initialized. Unfortunately some of the keywords supplied by C++ are reused and mean different things in different circumstances. I’ll cover the use of the static, const, mutable, and friend keywords in C++, and their multiple uses in this chapter.