We can help, but you first have to show that you're at least potentially capable of doing it yourself. Perhaps show some of your own code? Or at the very least explain your problem somewhat more...
I actually want to remove the serial numbers from a text file. so i want to generate a loop which has the variable which gets greater by 1 each time, and that variable is compared with the text and removed. i dont know the function for replacing actually to include it in the loop.. hope u will help.
Just read all lines and write those lines that aren't serial numbers into another file.
Or read all lines into a vector, then filter out the SNs and write the rest back to the original file.