Message-ID: <19991004150601.9857.rocketmail@web1401.mail.yahoo.com> Date: Mon, 4 Oct 1999 08:06:01 -0700 (PDT) From: Prashant TR Subject: Re: BASIC : how to open a file? To: djgpp AT delorie DOT com Cc: fiammy AT my-deja DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Reply-To: djgpp AT delorie DOT com --- fiammy AT my-deja DOT com wrote: > Could you give me an outline of a routine that loads > a file (in DOS), > and returns a pointer to the structure in which you > read the file? > int main() { FILE *fp; if ((fp = fopen("foo", "rb")) == NULL) { printf("Error: unable to open\n"); return (0x7f); } // Read from file here. The file pointer is in fp. // Use fread function. fclose(fp); return 0; } ===== __________________________________________________ Do You Yahoo!? Bid and sell for free at http://auctions.yahoo.com