September 2001
Beginner
970 pages
23h 20m
English
A structure declaration is the master plan that describes how a structure is put together. The declaration looks like this:
struct book {
char title[MAXTITL];
char author[MAXAUTL];
float value;
} ;
This declaration describes a structure made up of two character arrays and one float variable. It does not create an actual data object, but it describes what constitutes such an object. (Occasionally, we'll refer to a structure declaration as a template because it outlines how data will be stored. If you've heard of templates in C++, that's a different use of the word.) Let's look at the details. First comes the keyword struct. It identifies what comes next as a structure. Next comes an optional tag—the word ...
Read now
Unlock full access