On Mon, Mar 10, 2003 at 04:24:01PM +1300, [EMAIL PROTECTED] wrote:
> 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 ;) ))
indeed...
> use the srand call to init the generator with something like a timestamp
Didnt think of a timestamp. :P My brain is jelly from the bloody
perl+curses monitoring app I'm working on for IRLP.
> (on linux you could use the /dev/random or /dev/urandom devices)
Thinking, I'd read 4 bytes, and squish em together into an int or
something.. Suppose that'd work. anyway, something for the original poster
to do :)
Mike.
--
Mike Beattie <[EMAIL PROTECTED]> ZL4TXK, IRLP Node 6184
"Why Not? I'm drunk right now." -- Anthony Towns when asked about
naming the next Debian release after the winner of an auction.