On Mon, 10 Mar 2003 16:07:54 +1300
Mike Beattie <[EMAIL PROTECTED]> wrote:

> WARNING: rand() sucks, and will return the same numbers for each
> invocation of this program. I dont have time to go find the better
> method :P (supposed to be working)

the pseudo-random number generator should be initialized with a seed
(this at least prevents it from generating the same sequence all the
times (as long as you change the seed value ;) ))

use the srand call to init the generator with something like a timestamp

(on linux you could use the /dev/random or /dev/urandom devices)

cheers
--
Delio

Reply via email to