dave wrote in message ...
>In c is it possible to open a file for read write and without using a buffer
or second file change one character in the file and close it modified form
ex.
status.txt contains:
This is mode 1.
change to
This is mode 3
std::fstream Zstat("status.txt", std::ios::out | std::ios::binary);
Zstat.seekp( 13 );
if( not Zstat ){
using std::cout; // for NG posting
cout<<" file error="<<Zstat.flags()<<std::endl;
cout<<" ios::good="<<Zstat.good()<<std::endl;
cout<<" ios::bad="<<Zstat.bad()<<std::endl;
cout<<" ios::eof="<<Zstat.eof()<<std::endl;
cout<<" ios::fail="<<Zstat.fail()<<std::endl;
}
else{
Zstat << "3";
}
--
Bob R
POVrookie