Mail Archives: djgpp/1997/07/27/10:18:49
"Warren Smith" (gsmith AT netins DOT net) writes:
> How can I get a truly random number (w/o the same sequence of numbers
> appearing over and over)?
Seed the random generator using the system clock. The seeding functions
are srand for rand and srandom for random. There are a bunch of clock
functions, of which any that return integers and not structs should do,
for instance rawclock.
--
.*. Where feelings are concerned, answers are rarely simple [GeneDeWeese]
-() < When I go to the theater, I always go straight to the "bag and mix"
`*' bulk candy section...because variety is the spice of life... [me]
Paul Derbyshire ao950 AT freenet DOT carleton DOT ca, http://chat.carleton.ca/~pderbysh
- Raw text -