here is the code, that reads a file. Currently i am able to print contents of the file but i want to edit its contents. how can i do this?
#include<iostream>
#include<fstream>
using namespace std;
void main()
{
wfstream file;
file.open("hello.exe",ios::binary | ios::in);
if (!file)
{
cout<<"ERROR"<<endl;
exit(0);
}
wcout<<file.rdbuf();
}