C++ programming program design including data structure 7th ch09

Chapter 9:Records (structs)

Objectives•

In this chapter, you will:– Learn about records (structs)– Examine various operations on a struct– Manipulate data using a struct– Learn about the relationship between a structand functions– Examine the difference between arrays andstructs

Summary (cont’d.)• Dot (.) operator: member access operator– Used to access members of a struct

• The only built-in operations on a structare the assignment and member access• Neither arithmetic nor relationaloperations are allowed on structs• A struct can be passed by value orreference• A function can return a value of typestruct• structs can be members of other structsC++ Programming: Program Design Including Data Structures, Seventh Edition