Hello there
I am trying to parse a file by reading the bytes from it (ideally hex).
But I have a snag...
any bytes over the value of 127 give me problems (i.e. -128 etc).
How can i read the bytes out of the array.
for example. i have 2 qbytearrays here:
Qt Code:
count = 6; arrayParse = array.mid(b,2);To copy to clipboard, switch view to plain text mode
(the data contained within these two bytes is b00d)
if i try to read the first byte, i get a negative number.
how can i read it so i get the correct value?
or if that fails, how can i just read the file as hex??
(sorry if this is a chumps question!)
and in case you need more info, i have opened the file using file.open(QIODevice::ReadOnly);
Bookmarks