Please let me know if this is possible or even remotely possible! I need to write to a file, but directly to hex. For example, if I write "2D" to the file, i want to be able to open the file in a hex editor and see "2D" in the hex portion, not the ASCII portion. the only way i have been able to get "2D" into the hex portion is by writing "-" to the file.

i have been told this is possible, but so far have come up empty-handed. any ideas, hints, code, or suggestions would be greatly appreciated! Thanks!

keith

What format is the original data in, that you want written to the file? Your hex editor happens to display the stored value in hex format when it reads it. You might equally display it in decimal, or ASCII, or in some other format.

It's not stored as 'hex'.

yeah.. man.. i hav same problem.. i m also able to write my data in Dos Prompt using printf("%02x",mydata);

but wen i write this data into a file using fwrite(mydata,2,count,File *fp);

then its showing byte formate.. i need it in file as showing by printf() in dos screen.... can nebody tell me solution.. yaar hav become so fed-up....

So use fprintf() rather than printf()

with 010 editor program create array of file :unsigned long char[]={ , ,... }
2d


and write to file

with putc() function
"for" and "wb" activates

commented: You've opened a thread which is like 2 years old. The OP might have already solved the problem!!! +0
commented: I dont belive you deserve a red rep for this here is one to neutralize it +1

LOL you've opened a thread which is like two years old now. The OP might have already solved this problem by now.

Perhaps, he might have got a far better knowledge than what he had when he started this thread. And you post what information does it gives him anyway???? Try to explain things a bit more clear!!

ssharish

yeah, i really wish threads that have been inactive for more than 90 days would be automatically locked.

yeah, i really wish threads that have been inactive for more than 90 days would be automatically locked.

I'd reported this problem earlier in DaniWeb Community Feedback, but somehow, things didn't work out. Some problem regarding the workload that means for the mods or the work required for automating the 'lock' feature.

i just can't imagine it being really THAT hard of a feature to implement.

>i just can't imagine it being really THAT hard of a feature to implement.
It's not. In fact, I believe it's a feature of vBulletin if you choose to enable it.

>i really wish threads that have been inactive for
>more than 90 days would be automatically locked.
I don't. It's a good idea in theory, but painfully annoying in practice. Besides, there's no rule against adding to an existing discussion, regardless of how old it is.

The 90/10 rule usually applies.

90% of the time, it's some noob with nothing better to contribute than "yeah, me too, plzsndmetehcode" or other barely literate lameness.

>i really wish threads that have been inactive for
>more than 90 days would be automatically locked.

I don't. It's a good idea in theory, but painfully annoying in practice. Besides, there's no rule against adding to an existing discussion, regardless of how old it is.

the only thing painfully annoying, is reading a page of discussion, writing a reply, and then realizing its some 3-year-old thread from an OP who is long-gone, that was reactivated by some stupid noob.

because most every other legitimate forum on the internets has an "expiration" feature, i'm not in the habit of inspecting "post dates" of every thread.

theres nothing that needs to be added to some year-old thread that's of any importance.

The 90/10 rule usually applies.

90% of the time, it's some noob with nothing better to contribute than "yeah, me too, plzsndmetehcode" or other barely literate lameness.

Exactly.

me too.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.