From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: rand and random Organization: Pin Eight Software Message-ID: References: X-Newsreader: Forte Agent 1.6/32.525 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 17 X-Trace: /w3Za/STN6qkazMFk1m4K1xuJzmBFtNZpFARnad/2ZdenwcYz3nADt4gg7bdsXYfDVOmPv85yjTW!1jiJgyaYN66QD1gOCWAGKlBQR3LYaG2YaoY3XIzFDrUPz8BWxw8aDEH2EDkvRnalaw== X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Sun, 31 Oct 1999 03:03:08 GMT Distribution: world Date: Sun, 31 Oct 1999 03:03:09 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Sat, 30 Oct 1999 18:30:03 -0700, "Al Morgan" wrote: > How does one use the rand(), and random() functions? Read the libc docs. But I know you're busy: rand() will give a number between 0 and 32,767. Call srand(time(NULL)) beforehand. But don't use rand() for AI in video games with prerecorded demos; the pseudorandom sequence is implementation defined. -- Damian Yerrick Visit my web site: http://yerricde.spedia.net/