Mail Archives: djgpp/1999/08/01/20:38:57
On Sun, 1 Aug 1999, Radical NetSurfer wrote:
^^
Why can't you state your real name instead of
some silly alias?
> When I try to compile this sample code (from the Libc.hlp file), it
> compiles with no problems, HOWEVER, it does not work!!!
>
> what's wrong ?!?
> how is it FIXED ?!?
>
> #include <stdio.h>
> #include <time.h>
>
> /* size_t strftime(char *buf, size_t n, const char *format, const
> struct tm *time); */
>
> struct tm t;
>
> char buf[100];
>
> strftime(buf, 100, "%B %d, %Y", &t);
>
> printf("Date/Time: %s\n", buf);
> ----------------------------------------------------------------------------------------------------
> compiles: AOK
> outputs: January 00, 1900
> why this funky incorrect output?!?
What would you expect? You have to initialise 't' to some time+date
(using mktime for example).
> PLEASE: What other faulty things (ie SURPRISES) am I in
> store for with DJGPP ?!?
Learn C programming first, then you can complain about bugs you
think you've found.
Gisle V.
- Raw text -