From: myknees AT aol DOT com (Myknees) Newsgroups: comp.os.msdos.djgpp Subject: Re: Random implementation Date: 29 Jan 1998 00:39:44 GMT Lines: 28 Message-ID: <19980129003900.TAA29842@ladder03.news.aol.com> NNTP-Posting-Host: ladder03.news.aol.com References: <34CEAEE2 DOT 2DCF AT cs DOT com> Organization: AOL http://www.aol.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I have tried to do random numbers before without success. Now I think I know why. In the info documentation's alphabetical list, there is no mention of srand(). And there's no cross reference to srand() from rand(). I was able to glean from this thread that you're supposed to do something like this: #include #include #include #include int main(void) { char c; while((c=bioskey(0))!='x'){ printf("%-10c", c); srand(time(0)); printf("And the random number is... %d\n", rand()); } return 0; } But if this is right, how would a beginner find it out? (Besides, of course, reading about it from an outside source.) --Ed (Myknees)