Re: difference between date & time
- From: John Gordon <gordon@xxxxxxxxx>
- Date: Fri, 31 Aug 2007 15:10:20 +0000 (UTC)
In <1188546533.444384.49170@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> alcool <fabio.maresca@xxxxxxxxx> writes:
void cfrDate(char h[], char min[], char y[],char mo[], char d[]){
struct tm *newtime, *oldtime;
newtime->tm_hour = (int)h;
You can't convert from a string to an int this way. Instead, use atoi().
newtime->tm_hour = atoi(h);
--
John Gordon A is for Amy, who fell down the stairs
gordon@xxxxxxxxx B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"
.
- References:
- difference between date & time
- From: alcool
- Re: difference between date & time
- From: Eric Sosman
- Re: difference between date & time
- From: alcool
- difference between date & time
- Prev by Date: Re: size_t problems
- Next by Date: Re: size_t problems
- Previous by thread: Re: difference between date & time
- Next by thread: Perfect hash tables
- Index(es):
Relevant Pages
|