Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

5. Structs

Structs are user-defined types for grouping related variables into a single entity. They allow organization of data logically under one name. Structs can also define instance methods, enabling encapsulation of both data and behavior within the same construct.