8
Technicalities: Classes, etc.
Remember, things take time.
– Piet Hein
In this chapter, we keep our focus on our main tool for programming: the C++ programming language. We present language technicalities, mostly related to user-defined types, that is, to classes and enumerations. Much of the presentation of language features takes the form of the gradual improvement of a Date type. That way, we also get a chance to demonstrate some useful class design techniques.
§8.3 Interface and implementation
struct and functions; Member functions and constructors; Keep details private; Defining member functions; Referring to the current object; Reporting errors
Get Programming: Principles and Practice Using C++, 3rd Edition 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.