Binary File IO in C++ | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Binary File IO in C++

I want to create a Binary File in C++ to store data and read data from it simultaneously. The file must be in binary formate, not txt file and cannot readable when opened with a text editor. I am using Visual Studio Enterprise latest version. ISO C++ 17.

12th Jan 2020, 9:47 AM
C ++
C ++ - avatar
3 Réponses
0
tried but not found. fstream file; fstream.open("myfile.txt", ios::in | ios::out | ios::binary ) giving error.
12th Jan 2020, 9:56 AM
C ++
C ++ - avatar
0
I have seprated them by mistake... I am compiling it.. wait... ill tell the error
12th Jan 2020, 10:15 AM
C ++
C ++ - avatar
0
https://pasteboard.co/IPBMHLJ.png I want that if the file already doses not exists it will be created automatically. and if already there it will be overwritten.
12th Jan 2020, 10:26 AM
C ++
C ++ - avatar