tailieunhanh - Lecture Practical C++ programming - Chapter 12: Advanced types

The following will be discussed in this chapter: Define Structure, define Union, how can we tell what type of data is currently stored in a union?, define typedef, which is better typedef or #define? Why? Define enum type,. Inviting you refer. | Chapter - 12 Advanced Types Practical C Programming Copyright 2003 O Reilly and Associates Page 1 Structures Arrays allow you to create a data collection for a single type int data 100 Collection of 100 integers Structures allow you to collect data of different types The general form of a structure definition is variable-name Practical C Programming Copyright 2003 O Reilly and Associates Page 2 r Structure Usage Place for terminal cables struct bin terminal_cable_box The structure-name part of the definition may be omitted. The variable-name may also be omitted. This would define a structure type but no variables. Practical C Programming Copyright 2003 O Reilly and Associates Page