Date: Wed, 4 Nov 1998 11:12:23 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Pierre MAZIERE cc: djgpp AT delorie DOT com Subject: Re: Random Number In-Reply-To: <71kbql$a5$1@zoltar.gatchaman.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On 2 Nov 1998, Pierre MAZIERE wrote: > srandom(int seed) /* what is the meaning of this 'seed' ?*/ > for( ... ) > { > i=random(); > printf("%u \n",i); > ... > > }; > > Then things: > - Every time I launch the executable, the sequence of so called random > numbers printed on screen is always the same ( so where is the randomized > stuff ?) I tried to explain all this in section 22.22 of the DJGPP FAQ list. Please see if the information there is what you need. > - How can I manage to have 'i' between 0 and MaxRandomNumber ? This happens by default, if by MaxRandomNumber you mean the constant RAND_MAX defined on the stdlib.h header file.