Till now what we’ve covered has been essentially C with a few tweaks, notably cin and cout. Now it’s time to add the thing that puts the + in C++: classes.
Here’s a class type to store a calendar date.
Date arrival;//Variables of a class type are called "objects"
//Using the term makes you sound smart at job interviews
We could have done that with a struct. As with structs, we can declare variables of this type, pass them as parameters, get at the parts with “ . ”, and so on – it looks much the same. But we’re about ...