Enter your Sign-on user name and password.

Forgot password?
  • Follow us on:
Loading video...

Start Learning Now

Our free lessons will get you started (Flash® 10 required).
Get immediate access to our entire library.

Sign up for Educator.com

Features Overview

  • Get on-demand access to our complete library
  • Search and jump to exactly what you need to learn
  • Track your progress
  • Download practice and lesson files
  • *Ask questions and get answers from our community & instructors

Structures

  • Structures are a mechanism to better organize data
  • The “struct” syntax, struct { member, member, etc. };
  • Some examples using structures are presented, such as a “person” with a name and an age
  • Members of a structure variable are accessed using the dot (.) operator, e.g. var.member
  • Structures can contain members that are themselves structures
  • Structures can be initialized at compile time, or at run-time
  • Structures can be organized in arrays
  • Even multi-dimensional arrays
  • Pointers can point to a structure,
  • This allows for run-time allocation and de-allocation of structures
  • This is also the only way a structure may have itself as a member
  • Members of a structure pointer are accessed using the (–>) operator, e.g. ptr–>member
  • Here is more information about C++ data structures: http://www.cplusplus.com/doc/tutorial/structures/

Structures

Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.

Computer Science: Introduction to C++