Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Summary

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.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial