[prev] 76 [next]

Structures (cont)

One structure can be nested inside another:

typedef struct {
	int day, month;
} DateT;

typedef struct {
	int hour, minute;
} TimeT;

typedef struct {
	char   plate[7];   // e.g. "DSA42X"
	double speed;
        DateT  d;
	TimeT  t;
} TicketT;