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.
5 messages · Page 1 of 1 (latest)
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.
If you say that it's my text editor that is converting the character's binary data automatically, well how come the integer's binary data are not converted in characters and why are they left in binary format when I read the file?
Because it's a text editor. It'll take whatever bytes are in your file and try to display them as text. Since you're writing text to your file, you see text. Writing ints, on the other hand, isn't the same as writing the text representation of those ints. Try to open it up in a text editor, and you'll get random nonsense since the bytes aren't text.
You can open up your compiled program in a text editor too, it'll likely be a lot of nonsense, but you may be able to spot a few sections of valid text hidden inside it where file1.bin and abcdefg are stored inside it
Here's an excerpt from a hexdump of your above program, compiled on my machine. The program isn't text, but the bytes for your strings are:
Thank you and let us know if you have any more questions!
This thread is now set to auto-hide after an hour of inactivity