how do I read in a file and output that is different from the input?

I will be dealing with unsigned long long ints as an array of type char[8].
I need it to skip 0-5 as these are reserved characters. After the first 0-5 skip every 0 and mark it with a 1 to mean write out the next 8 bytes(9 bytes total are written).
Example if this is fread : 09842658
then output will be :109842658
But if the first number is not a 0 then proceed to encode it: output = 98042658 = 6
and I need it to add a digit to the encode every time it gets to a new power of two, example if the last two chars in the array and skipping over the zeros of the first six: (array element 0,0,0,0,0,0,10)then output = 07
And I need to increment +=2 on the encode so that every even number from that starting point will be encoded.
Can anyone help me get started? I don't know what to do. I can't even get started every time I try my brain locks up.
Thank you for your time and patience.
Last edited on
bump please
Thanks
Can anyone help me get started? I don't know what to do.


Nobody knows what you should do either. Your explanation isn't exactly precise or clear.

Instead of beginning with what you'll be "dealing with" perhaps you should start with an overview of what you hope to accomplish.
Topic archived. No new replies allowed.