How do I create a code that can read binary files and copy what they say into a text file titled "out_file.txt". Needed for a program I am creating.
NOTE: Thanks in advance for anyone who knows how to solve this problem!
Printable View
How do I create a code that can read binary files and copy what they say into a text file titled "out_file.txt". Needed for a program I am creating.
NOTE: Thanks in advance for anyone who knows how to solve this problem!
open the binary file(s) for reading
open the text file for writing (using a text mode specifer)
for each binary file, read it, write to the text file.
I have tried that technique but it did not work. I think I need to use the fread and fwrite functions according to the FAQ page. Although I am unsure how to use those functions and have failed in finding information on how to use them. Thank you!!
You should befriend your local man page.