🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.lang.learn.c-c++
Article #580

Reading Binary or Hex Data from a File

#580
From: Alex Sramek
Date: Thu, 03 Feb 2000 00:00
19 lines
1514 bytes
Hi, I have a bunch of .dat files that I need to read with a program I'm
making.  However, I haven't found a way, with my limited c++ experience, to
do so.  If fstream is used, special characters will most likely be
overlooked, and the data I'm reading has a range from 00 to FF.  I'd like to
read it in hex, or as 8-bit integers, or even bitwise... I just want to read
it and make sure everything gets in OK.

Can anyone help me?
(Please only respond if you can)

Thanx!

-Alex

--
-Alex Sramek

"You couldn't hear a dump truck driving through a nitroglycerine plant."
--Uncle Louis, "Christmas Vacation"
Technical Details
Message-ID: <s9knkid5dh169@corp.supernews.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1118e6,34922ce457bf482,start
X-Google-Attributes: gid1118e6,public
X-Google-Thread: 114592,34922ce457bf482,start
X-Google-Attributes: gid114592,public
X-Google-Thread: 109fba,34922ce457bf482,start
X-Google-Attributes: gid109fba,public
X-Google-Thread: 103c8d,34922ce457bf482,start
X-Google-Attributes: gid103c8d,public
From: "Alex Sramek" <losal4@mminternet.com>
Subject: Reading Binary or Hex Data from a File
Date: 2000/02/03
Message-ID: <s9knkid5dh169@corp.supernews.com>
X-Deja-AN: 581395630
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
X-Complaints-To: newsabuse@supernews.com
Organization: Posted via Supernews, http://www.supernews.com
X-MSMail-Priority: Normal
Newsgroups: alt.comp.lang.learn.c-c++,borland.public.cppbuilder.language,borland.public.cppbuilder.vcl,comp.lang.c++