There is many ways to do what you want and I think the simple is do it whith a CString cause it facilitate the search. Here is ,at the glance what could it be like.
I hope it will be helpfull.
Suppose you have opened your textfile Using a CFile file
CString str;
LPSTR wherToRead=str.GetBuffer(file.GetLength()); // define memory where to read the file
file.Read(whereToRead,file.GetLength()); // reading the file
str.ReleaseBuffer();
// Do what you want to do with the file
// And now the search
int startSearch=0; // where to start the search , first from the begining 0
int positionFound=0; // The position of the found occurence
while(1)
{
positionFound=str.Find("int_",startSearch);
if(positionFound==-1) break; // if not found go out
str.Insert(positionFound+5,"-100"

; // insert what you want at the position found + number of the occurence here int_x=5 characters modify it as you like
startSearch=positionFound+5;
}
// now writing the new file
LPSTR fromToWrite=str.GetBuffer(str.GetLength());
file.Write(fromToWrite,str.GetLength());
str.ReleaseBuffer();
.........
c.ami@caramail.com