Glossary coding Term Page
Struct
A custom data type that bundles several related fields into one value
Core Idea
A struct is a user-defined type that bundles values with different meanings into one named unit. Student records, coordinates, and UI cards all become easier to model when related fields move together.
Where arrays line up same-kind values, structs gather different roles into one concept. That improves readability and makes function signatures, pointer usage, and data modeling much clearer. In C structs often appear with pointers, and in Rust they anchor field-based data design.
Why It Matters Here
Mathbong uses structs as a bridge between C data modeling and Rust user-defined types. They become a recurring hub for state modeling, file separation, and method-oriented design.