December 2013
Beginner
576 pages
16h 4m
English
We should mention that you have some flexibility in defining a structure. First, you can declare a variable to be of a particular structure type at the same time that the structure is defined. You do this simply by including the variable names before the terminating semicolon of the structure definition. For example, the following statement defines the structure date and also declares the variables todaysDate and purchaseDate to be of this type:
struct date{ int month; int day; int year;} todaysDate, purchaseDate;
You can also assign initial values to the variables in the normal fashion. Therefore, the following defines the structure date and the variable todaysDate with ...
Read now
Unlock full access