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 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.