THIS FOLLOWING CODE IS NOT WORKING
Code:
#include<iostream.h>
#include<conio.h>
int main()
{
char ch;
fstream file("m.txt",ios::in|ios::ate|ios::out);
file.seekg(0);
while(file.eof()==0)
{
file.get(ch);
if(ch=='h')
ch='i';
}
file.seekg(0);
while(file.eof()==0)
{
file.get(ch);
cout<<ch;
}
return 0;
}
this code is for replacing the characters in the file named "m.txt" but it is not working and not showing any error.
plz solve this query
from
deepak kr.