[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] calling fini
- Subject: [ale] calling fini
- From: ChrisF at computone.com (Chris Fowler)
- Date: Fri, 9 Mar 2001 11:25:56 -0500
Here is update code and stil getting: calling fini:
#include <time.h>
int
main(void)
{
?????????????? int hour = 0;
?????????????? int minutes = 0;
?????????????? int seconds = 0;
?????????????? char amp ='a';
?????????????? time_t *timet;
?????????????? struct tm *buf;
?????????????? time(timet);
?????????????? buf = localtime(timet);
?????????????? hour = buf->tm_hour;
?????????????? minutes = buf->tm_min;
?????????????? seconds = buf->tm_sec;
?????????????? if ( hour > 12 )
?????????????? {
?????????????? ?????????????? hour = hour - 12;
?????????????? ?????????????? amp = 'p';
?????????????? }
?????????????? printf("%02d:%02d:%02d%c\n", hour,minutes,seconds, amp);
?????????????? return 0;
}
-----Original Message-----
From: mic at mathcs.emory.edu [mailto:mic at mathcs.emory.edu]
To: ale at ale.org
Sent: Friday, March 09, 2001 11:11 AM
To: ChrisF at computone.com
Subject: Re: [ale] calling fini
> ?????????? char *test ='\0';
C sillently promotes '\0' to 0 (NULL).?? You probably want:
?????????????? char *test = "\0";