Mail Archives: djgpp/1996/11/21/06:22:07
On Wed, 20 Nov 1996, John M. Aldrich wrote:
> You must seed the random number generator with a call to srand() before
> you use any random numbers in your program. The output of time(0) is
> usually a good seed to use.
This is only necessary if you want a *different* random series each
time. Otherwise, no call to `srand' is required.
> Since this is going to the newsgroup, I have a comment for Eli/DJ: It
> appears that, for some reason, srand() got left out of the libc.inf
> documentation! Was this something deliberate, or just a mistake?
Omission. I don't think somebody would deliberately omit docs of an ANSI
function.
- Raw text -