what do you want?
remove a certain text in file or a line?
if you mean a line, do it :
in a loop write lines until you arrive to that.
then read that line but don't write.
after that in a loop write remainder lines.
CFile f;
f.Open(_T("path of the file"),CFile::modeRead|CFile::modeWrite);
read function is :
f.Read(buffer,count);
write function is:
f.Write(buffer,count);
f.Close();