结构声明:
例:
struct book
{
char title[MAXTITL];
char author[MAXAUTL];
float value;
};
使用: struct book library;
以上等于:
struct book
{
char title[MAXTITL];
char author[MAXAUTL];
float value;
} library;
或者:
struct
{
char title[MAXTITL];
char author[MAXAUTL];
float value;
} library;
C99的一种初始化方法:
struct book surprise = {.value = 10.99}; 可以按照任意的顺序使用指定初始化项目。