Data Members with Special Properties

You probably never thought about using constant and reference data members before. The issue did not come up in our previous discussions of software engineering issues. When at the end of the Chapter 8, "Object-Oriented Programming with Functions," I was enumerating the issues that the introduction of C++ classes resolved, I talked about binding data and operations together, introducing class scope for data members and member function names, controlling access to class members, and pushing responsibilities from clients to servers.

All these are legitimate and internally consistent goals related to the support of object-oriented programming principles. In Chapter 9-11 I talked about other (read: unexpected) ...

Get Core C++ A Software Engineering Approach now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.