From: "Crousto" Newsgroups: comp.os.msdos.djgpp Subject: Re: randomness Date: Wed, 24 Feb 1999 21:00:54 +0100 Organization: Ye 'Ol Disorganized NNTPCache groupie Lines: 15 Message-ID: <919886503.675537@eole> References: <36d335f8 DOT 5674902 AT news DOT demone1 DOT ia DOT home DOT com> NNTP-Posting-Host: eole.infonie.be X-Newsreader: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Cache-Post-Path: eole!unknown AT ppp-bruxelles-2-165 DOT infonie DOT be To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Jonathan a écrit dans le message <36d335f8 DOT 5674902 AT news DOT demone1 DOT ia DOT home DOT com>... >How is the best way to get a good random seed for use in srand()? > >Jonathan You can use the BIOS function which return the system time (in milliseconds since midnight). Also, if you have somewhere in your program a moment when the user must press a key to continue, you can set up a loop which increment a counter until the key is pressed : this value will be very random. Crousto crousto AT infonie DOT be