Mail Archives: djgpp/1999/10/04/11:32:35
--- 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
- Raw text -