|
|
|
|
|
|
|
Chapter 3
Data Structures |
|
|
|
|
|
|
|
|
In this section, I briefly look at the major data structures used by SCDTL, considering their characteristics, capabilities, and limitations and discussing their raisons d'être. |
|
|
|
|
|
|
|
|
The basic SCDTL system makes use of only two special data structures. Both are exceptionally simple. One, called TIME_INFO, carries variables for hours, minutes, and seconds and is used to represent time of day. It is defined in the header file timeinfo.h. This structure is defined as: |
|
|
|
|
|
|
|
|
struct TIME_INFO
{
int hours;
int minutes;
int seconds;
}; |
|
|
|
|
|
|
|
|
The other structure, DATE_INFO, carries variables for year, month, and day and is used to represent a date. It is defined in the header file dateinfo.h. This structure is defined as: |
|
|
|
|
|