CString inputf="wc.txt";
CFile iFile( _T(inputf), CFile::modeCreate|CFile::modeReadWrite);
char buf[100*1024];
iFile.Read(buf,100*1024);
CString csml;
csml=buf;
csml.Replace(" <"," ");
iFile.Write(csml,strlen(csml));
iFile.Close();
//-------------------------------------------------------------------------Â*-------
this code reads the content of wc.txt to csml, and replace the
characters with " ", then save the result to wc.txt.
but unfortunately, bad things happen, the goal doesn't achieved.
i think the reason is the program can't find the end of the string
"\0".
i want to ask how to deal with it?
thanks very much!