From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: Help: Using the clock to seed srand() Date: Thu, 24 Apr 1997 09:43:44 -0700 Organization: Alcyone Systems Lines: 21 Message-ID: <335F8DC0.451497FD@alcyone.com> References: NNTP-Posting-Host: newton.alcyone.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 Precedence: bulk Eli Zaretskii wrote: > You are using real-mode tricks in a protected-mode program, which is > why your program crashes. You can't access absolute addresses in that > way, because protected mode doesn't allow that. Besides, there's an easier way to seed the random number generator using the time, and it's ANSI C: #include #include srand(time(0)); -- Erik Max Francis, &tSftDotIotE / email / max AT alcyone DOT com Alcyone Systems / web / http://www.alcyone.com/max/ San Jose, California, United States / icbm / 37 20 07 N 121 53 38 W \ "The future / is right there." / Bill Moyers