From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: random() Date: Sun, 05 Jan 1997 15:29:43 -0800 Organization: Two pounds of chaos and a pinch of salt Lines: 34 Message-ID: <32D03967.668C@cs.com> References: <5aouvm$erv AT cocoa DOT brown DOT edu> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp110.cs.com 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 David Avery wrote: > > Is there a randomize() funtion for DJGPP? If so > which Lib is it in? I keep getting the same #'s > when I use the random() funtion, and I need > to randomize the # seed. randomize() is a Borland-esque obscenity. :) Try this code: #include #include int main( void ) { srandom( (int) time( NULL ) ); ... } > Thanks for the Help. > (For some reason the help viewer > crashes on my system) There have been a few minor problems with the Info viewer in the past. Please post details about your system and its configuration; also specify what version of Info you use. You could also be a bit more specific about what happens when Info crashes. :) -- --------------------------------------------------------------------- | John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com | | Plan: To find ANYONE willing to | http://www.cs.com/fighteer | | play Descent 2 on DWANGO! | Tagline: | ---------------------------------------------------------------------