[ale] calling fini

Chris Fowler ChrisF at computone.com
Fri Mar 9 11:25:56 EST 2001





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";







More information about the Ale mailing list