struct

Description
good see this

Please download to get full document.

View again

of 29
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Information
Category:

Documents

Publish on:

Views: 6 | Pages: 29

Extension: PPT | Download: 0

Share
Transcript
  1 Programming Structures  COMP102 Prog. Fundamentals, Structures / Slide 2 2 Structures   A Structureis a collection of related data items, possibly of different types.   A structure type in C++ is called struct.   A structis heterogeneousin that it can be composed of data of different types.  In contrast, arrayis homogeneoussince it can contain only data of the same type.  COMP102 Prog. Fundamentals, Structures / Slide 3 3 Structures  Structures hold data that belong together  .  Examples:  Student record: student id, name, major, gender, start year, …  Bank account: account number, name, currency, balance, …   Address book: name, address, telephone number, …  In database applications, structures are called records.  COMP102 Prog. Fundamentals, Structures / Slide 4 4 Structures  Individual components of a struct type are called members(or fields).  Members can be of different types(simple, array or struct).   A struct is named as a whole while individual members are named using field identifiers.  Complex data structures can be formed by defining arrays of structs.
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks