Date: Tue, 16 Sep 1997 16:13:06 +0800 (GMT) From: Orlando Andico To: David Lenk cc: djgpp AT delorie DOT com Subject: Re: how do i do this In-Reply-To: <5vkqrg$ua@bgtnsc02.worldnet.att.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On 16 Sep 1997, David Lenk wrote: .. > anyways, I need a small program that will make a random 8.3 format text > file (8.3 refers to the dos standard file length). The name generated > would then have to be stored in a variable so that it could be used in a > 'fprintf' command. I know how to write the file using fprintf but I have > no ideal of how to generate the random name. I have tried to make the > filename a random number but the program crashes with a GPF, and during > compilation i get pointer errors. use the tmpnam() function: #include char *tmpnam (char *s) which is designed exactly to produce a random filename. ------------------------------------------------------------------- Orlando Alcantara Andico WWW: http://www2.mozcom.com/~orly/ Email: orly AT mozcom DOT com ICBM: 14 30 00 N 120 59 00 E POTS: (+632) 932-2385