I am confused on how to read in a certain amount of bytes at a time as hex numbers from a binary file.
I want to open a binary file and read the first 4 bytes. can anyone give me an example of how to do this after the file is opened.
I am confused on how to read in a certain amount of bytes at a time as hex numbers from a binary file.
I want to open a binary file and read the first 4 bytes. can anyone give me an example of how to do this after the file is opened.
You should take a look at the fread() function. I think that will do what you need.
- Sean
If cities were built like software is built, the first woodpecker to come along would level civilization.
Black Frog Studios
alright, once I have read in these bytes. How can I compare it to see if it is the right 4 bytes