Summary

In this chapter, you learned the basic definition of the struct data structure, as well as how to create structs in applicable languages. We also examined some common applications of structs including the very common enum data type. Finally, we looked at some previous code examples to check whether we could improve on them using struct objects instead of custom classes.

Get Everyday Data Structures 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.