From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire) Newsgroups: comp.os.msdos.djgpp Subject: Re: Randon Function Date: 7 Feb 1998 06:44:49 GMT Organization: The National Capital FreeNet Lines: 18 Message-ID: <6bgvt1$ruu@freenet-news.carleton.ca> References: <6bgtsb$h8o AT alpha DOT delta DOT edu> Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire) NNTP-Posting-Host: freenet5.carleton.ca To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk "Matt Kris" (jdkris AT NOPOOPalpha DOT delta DOT edu) writes: > I need to make a function that will open a text file that contains a list of > 100 words and take a randon word and store it in an array. I made a > function that will open the file and read the first word but I don't know > how to read the other lines. Is there a way to move through files like > that? Please help. Easy. Obtain a random number r from 0 to 99. Open the file. Then for (i=0; i