www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/16/00:32:00

From: ckeenan AT scsn DOT net (Chris)
Newsgroups: comp.os.msdos.djgpp,comp.lang.c++
Subject: Reading binary files
Date: Fri, 13 Jun 1997 12:20:19 GMT
Organization: All USENET -- http://www.Supernews.com
Lines: 18
Message-ID: <33a13a3a.2140316@supernews.scsn.net>
NNTP-Posting-Host: cola112.scsn.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hello All,

I have a minor problem that probably has a simple solution that I have
overlooked.

When reading in binary files, I need to know how to stop when reaching
the EOF.

I know that stdio has a function fread but it doesn't check for end of
file.

What I am doing is reading in numbers as shorts and need a function
that can do that with a binary file and stop at the EOF.  How is this
best accomplished.

Thanks,
Chris
ckeenan AT scsn DOT net

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019