0
Binary file to TXT file
My c++ program is binary file it stores data in binary file but I want it to store in txt file how can I do this. (reinterpret_cast<char *> (&st), sizeof(student))) This command read from a bInary file What is the command for reading from a txt file. Urgent help needed. Kindly
1 Réponse
+ 1
Basically 2 steps.
1. Read your binary file into an appropriate data structure. This could involve techniques mentioned at: https://stackoverflow.com/questions/22192254/reading-binary-data-into-struct-with-ifstream
2. Write the file using your text format. You could use << operators, endl...