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.
f.Open(_T("path of the file"),CFile::modeRead|CFile::modeWrite);
read function is :
write function is: