Introduction
A struct lets you group related data together in one place. It is a simple way to create your own data type.
When you want to represent a small group of related values, like a point with X and Y coordinates.
When you need a lightweight object that holds data but does not require inheritance.
When you want to avoid the overhead of a class for simple data containers.
When you want to pass data by value instead of by reference.
When you want to create a type that behaves like a basic data type.