KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have an 8-byte array in my application with this data: 00000133339e36a2 This data represents a long (on the platform the data was written in, on a Mac this would be a long long) with the value of 1319420966562 In the actual application this is a semi-randomized set of data, so the number will always be different. Therefore, I need to convert the byte array into a printable long long. I've tried casting the data directly into a long long, but I came up with 1305392 where I should have been seeing the above number. For those of you with more experience in C byte manipulation than I do, how would I correctly convert a byte array to a long long? EDIT: Strangely, all of your solutions keep outputting the same number: 866006690. That is the decimal equivalent of the last four bytes of the data.
Tags (comma-separated)
Save Edits
Cancel