Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
We introduced the record, which is a data type designed to hold different data types. Each type within a record is called a field of the record. In C++, a record is known as a struct. When a struct is defined, it is given a name. This name refers to the new type of variable that has just been created.
Records can be assigned values just like any variable. To assign values to a struct, we assign each of the fields of the struct using the field names.