Zebra0.com

cpp structuresStructures: combining data elements

Structures: combining data elements

Learn C++ in step-by-step lessons.

Structures: combining data elements

A data structure is defined using the struct keyword. It lets you combine data items of different types. The data items that make up a struct are called elements.

A struct is a user defined data type. A struct usually begins with an Uppercase letter.

Once the struct is defined, you can declare data items to be that type.


Goals:

Objectives:

Please study the material at each of the links below.

  1. A student is a person
  2. Declaring with initial values
  3. A manager is an employee is a person
  4. A manager is an employee with initial values
  5. The time_t struct
  6. The current date and time
  7. Finding a Persons age
GlossaryGlossary for structures lesson
Full Glossary