pa********@hotmail.com said:
I am try ing to use ctime with the type time_t ,
I used
...
time_t t = time(0);
char* sc = ctime( &t);
printf ("%s\n", sc);
...
it crashes for 64 bit compilations but does file with gcc -m32,
Is there a any fix to this problem, I am searching for a 64 bit
compatible definition for ctime , is it available by default
Assuming you have #included <stdio.hand <time.h>, there is nothing wrong
with the code you have shown. Therefore, either you failed to include one
or other (or both) of those headers, or the problem lies elsewhere in your
code, or you have a broken compiler. My bet is on Option 2.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999