well this is what i got and the code compiles but and gives me the current time and then gives me an error and boots out.
Code:
{
time_t t1;
struct tm *tptr;
clock_t ticks;
char *s;
struct tm *ntptr;
if ( ( t1 = time(( time_t * ) 0 )) != ( time_t )-1 )
{
s = ctime( &t1 );
printf( "Current time is %s", s );
tptr = localtime( &t1 );
ntptr->tm_min = mktime(tptr->tm_min += 30);
printf( "You have an appointment in 30 minutes at time %d:%d:%d.\n",
ntptr->tm_hour,
ntptr->tm_min,
ntptr->tm_sec );
}
else
printf( "Error with the time() function\n" );
return 0;
}