Mail Archives: djgpp/1999/05/25/14:39:56
Hi all!
Here's a weird little fact (not a real problem, but weird notheless):
The following code results in an error:
#include <time.h>
#include <stdlib.h>
int main(void) {
srand(time(0));
return(0);
} // main()
When stepping through this in RHIDE, watching errno like a hawk, immediatly
after srand(time(0)); errno is set to 22 (ENOENT) (and thus causes my
program to believe there's an error, which it wisely ignores).
Is there anything I'm missing here, or is this just some weird frill in the
RNG or the time()?
Greetz!
Dlanor
- Raw text -