Read as Binary

reading files in binary

Page 1 of 1

2 Replies - 602 Views - Last Post: 21 May 2009 - 08:11 AM Rate Topic: -----

#1 DingleNutZ   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 121
  • Joined: 02-May 09

Read as Binary

Posted 20 May 2009 - 07:11 PM

i have googled, and yahoo'd, and Ask'ed but to no avail have i found the answer to my problem.

is their anyway to read a file in binary, such as read an exe in binary, or a text file?

please help i cant think of anyway this could work.

thanx in advanced for any help.
Is This A Good Question/Topic? 0
  • +

Replies To: Read as Binary

#2 NickDMax   User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2255
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

Re: Read as Binary

Posted 21 May 2009 - 08:10 AM

open a file in binary mode. In C use fopen("filename", "rb"); in C++ use fstream::open("filename", ios_base::binary).

See an example here
Was This Post Helpful? 0
  • +
  • -

#3 Mowgef   User is offline

  • D.I.C Head

Reputation: 11
  • View blog
  • Posts: 245
  • Joined: 01-May 09

Re: Read as Binary

Posted 21 May 2009 - 08:11 AM

http://www.dreaminco...topic106225.htm
...
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1