EXPLORATION 34

image

More About Member Functions

Member functions and constructors are even more fun than what you’ve learned so far. This Exploration continues to uncover their mysteries.

Revisiting Project 1

What did you find most frustrating about Project 1 (Exploration 28)? If you are anything like me (although I hope you’re not, for your own sake), you may have been disappointed that you had to define several separate vectors to store one set of records. However, without knowing about classes, that was the only feasible approach. Now that you’ve been introduced to classes, you can fix the program. Write a class definition to store one record. ...

Get Exploring C++ 11, Second Edition now with O’Reilly online learning.

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