Structured Data

Steven Zeil

Old Dominion University, Dept. of Computer Science

Table of Contents

1. Structs
1.1. Items in Parallel Arrays
1.2. A Struct for Auction Items
1.3. Accessing Fields
1.4. Things We Can Do With Structs
1.5. Things We Cannot Do With Structs
1.6. Scope
2. Structs Within Structs
2.1. Time for Another Struct
2.2. Accessing Structs Within Structs
3. Arrays of Structs
3.1. Example: Rewriting the Auction Program
4. Arrays Within Structs
4.1. Data Collections
4.2. The Items Collection
4.3. The Items Collection
4.4. Example: Rewriting the Auction Program (Again)

Sometimes we have data items that we would like to group together.