Home Segments Index Top Previous Next

254: Mainline

C encourages you to define C structures, such as the trade structure, that correspond to naturally occurring categories. Once you have defined a structure, you can construct any number of structure objects, each of which corresponds to an individual.

When you define the trade structure, for example, you indicate that individual trades are associated with two numbers, one corresponding to the price per share and the other corresponding to the number of shares. Then, you can construct trade objects with particular prices and quantities.

Thus, the employment of structures enables you to create information bundles in your programs that describe naturally occurring individuals. Consequently, structures help you to produce clear, easy-to-understand programs.