Summary
We have covered several concepts in this chapter. We looked at unions and structs and how they differ from classes (and how they don't). We then went into detail about different types of constructors and discussed possible problems when copying objects and how to solve them. We learned about the rule of three and how important it is. Finally, we had a quick look at destructors.
We found that C++ has some very specific things we must keep in mind when defining our own types and found out that we must handle dynamic memory very carefully and design our classes accordingly. So long as we follow the guidelines laid out in this chapter, we can see that C++ gives us all the tools needed to create robust and easy-to-use types.
All this information has armed us with the necessary knowledge to step further into object-oriented concepts, confident that we have the basics covered. The coming chapter will discuss how best to design our classes from a front-facing perspective...