#Print file offset in hex

8 messages · Page 1 of 1 (latest)

hallow linden
#

Hey guys just trying to print the file offset in hex preceding my print out of 1 byte from the file. Line 223 is where I want to print it

vocal basaltBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

velvet isle
#

Haven't looked at your code yet, but I believe ftell can get you where the file head is located relative to the start of the file.
Then you can printf with "%x" to print integers in hex

hallow linden
#

I'll do try that I used that to get the size of the file I guess it could also be used to find position

hallow linden
#

I am trying to compare against od -t xl file

#

but my ouptut matches except the preceding values

vocal basaltBOT
#

This question thread is being automatically closed. If your question is not answered feel free to bump the post or re-ask. Take a look at !howto ask for tips on improving your question.