From: "A. Sinan Unur" Newsgroups: comp.os.msdos.djgpp Subject: Re: Random numbers Date: Mon, 02 Jun 1997 11:39:08 -0400 Organization: Cornell University Lines: 13 Sender: asu1 AT cornell DOT edu (Verified) Message-ID: <3392E91C.252B@cornell.edu> References: <01bc6ce9$72076bc0$363e63c3 AT 8652hvt73761> <338F40EE DOT 5244E66 AT alcyone DOT com> <339110F2 DOT 7537 AT nxus DOT com> Reply-To: asu1 AT cornell DOT edu NNTP-Posting-Host: 128 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk cjwhite wrote: > > I have been playing around with random numbers for a few days using > random() % (whatever) but the numbers to not appear to be random. It > seems to only randomize when i recompile. I can manually enter a new > seed, but i am using this for a game so i need to have the computer > generate truly random numbers by itself. > all computer generated random numbers are pseudo-random. you can avoid the predictability of the sequence by using something like the clock ticks as the seed. -- Sinan