Article View: comp.os.msdos.programmer
Article #427Help reading a DOS file
From: David A. Ondzes
Date: Wed, 22 Jul 1992 15:43
Date: Wed, 22 Jul 1992 15:43
22 lines
1246 bytes
1246 bytes
I need some help. One of my games writes it data to a file, and I would like to read this file. When I type the file to the screen it shows up as a bunch of happy faces etc ... so I am assuming it is a binary file. Is this correct assumption ? I can make out some text in the file. I have looked at the file with various hex edit programs to find out where the data I want is. How do I read in the data ? I tried using fscanf(fd,"%x",&int). I would like to be able to read in 2 hex digits at a time, because this is how I saw the file with the hex editors mentioned above. Any help involing reading files that are not ascii text would also be appreciated. Please send replys to picasso@bass.bu.edu Thank you David Ondzes
Technical Details
Message-ID:
<DAO.92Jul22104319@d62iggy.mitre.org>Path:
arc1-ca.pugleaf.net!sparky!uunet!sun-barr!ames!agate!linus!linus.mitre.org!mbunix!daoShow Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!ames!agate!linus!linus.mitre.org!mbunix!dao From: dao@d62iggy.mitre.org (David A. Ondzes) Subject: Help reading a DOS file Message-ID: <DAO.92Jul22104319@d62iggy.mitre.org> Sender: news@linus.mitre.org (News Service) Nntp-Posting-Host: d62iggy.mitre.org Reply-To: picasso@bass.bu.edu Organization: The Mitre Corp., Bedford, MA. Distribution: comp.os.msdos.programmer Date: Wed, 22 Jul 1992 15:43:19 GMT Lines: 23