Hi developers, i try to write a file in binary format. But that file is not in binary format, i dont know what's wrong in my code
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
fstream file("file path", ios_base::binary | ios_base::in);
char buf[] = "BinaryFile";
file.write(buf, sizeof(buf));
file.close();
}
//My file is not in binary format whats wrong in my code explain me guys...
Thanks in Advance