|
-
Sep 24th, 2000, 10:37 PM
#1
Thread Starter
Lively Member
Please I am begging. I have looked through so many articles and so many discussions that my eyes are about to cross. I can not get this to work. I am trying to open a file with a .bin extention. I assume it is binary, right? It opens in a hex editor just fine. I want to be able to open it, read certain chunks of data and display them as Hexadecimal, take options and selections from the user as hex data combine everything in a specific order and write it out as a new binary file. The binary files are relatively small at 4k per file. What I am having a problem with is this. I open the file for binary just like I read. when I look at the value it is in some kind of extended ascii format or something. I thought it was supposed to be 1's and 0's? It really wouldnt matter to me what it was since all I want to deal with is hex and let a conversion code handle the going back and fourth between bin and hex. So I have tried almost every single code sample I can find for (and there are plenty of them). But all of them fail and give me errors. I assume it is because they are expecting to see 1's and 0's and instead are being passed those extended ascii or whatever they are. Is it obvious what I am I doing wrong? Any pointers would be greatly appreciated. or a code sample of reading 1 byte from binary and showing as a two char hex string would be awesome.
Thanks in Advance for any help,
Richard
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|