[an error occurred while processing this directive]
|
typedef struct _RECORD
{
char year;
char month;
char day;
char hour;
char min;
} RECORD;
RECORD Record[NUM];
RECORD Last;
for (int i = 0; i < NUM; i++)
{
if (Last.year > Record[i].year) continue;
if (Last.year < Record[i].year) goto SaveLast;
if (Last.month > Record[i].month) continue;
if (Last.month < Record[i].month) goto SaveLast;
if (Last.day > Record[i].day) continue;
if (Last.day < Record[i].day) goto SaveLast;
if (Last.hour > Record[i].hour) continue;
if (Last.hour < Record[i].hour) goto SaveLast;
if (Last.min > Record[i].min) continue;
SaveLast:
Last.year = Record[i].year;
Last.month = Record[i].month;
Last.day = Record[i].day;
Last.hour = Record[i].hour;
Last.min = Record[i].min;
}
E-mail: info@telesys.ru