Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » BUG? or Not BUG? LoadFile(filename) and then getting wrong data
BUG? or Not BUG? LoadFile(filename) and then getting wrong data [message #33441] Sat, 06 August 2011 10:58 Go to previous message
silverx is currently offline  silverx
Messages: 62
Registered: March 2011
Member
I am try to write a hex viewer, and I am using the following to get the data in from the file.

String mfileinfo = LoadFile(fs);

Then I am using

thebyte = mfileinfo[i];

Where i just counts through 1 byte at a time the data on the file.

I have tried with thebyte being defined as int unsigned, int, and char, and when it encounters a hex byte of C3 in the input file it gives the value as -61, also when it comes to a C8 it gives a -56 as the value for thebyte.

When C3 should return 195, and the C8 should return 200.

Why am I getting the what I think is the wrong value for those bytes? How do I get it to return the correct value?

Is this a BUG, problem with LoadFile? Should I use some other way to load the data into the program?

Thanks

David
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Polymorphic Array doubt
Next Topic: Need help about the codepage!
Goto Forum:
  


Current Time: Sun May 12 04:13:25 CEST 2024

Total time taken to generate the page: 0.03197 seconds