Kernelpanic is right! Something is wrong with the code itself and the modifications to use files must have brought out the bug. It was working as I stated. I complie and ran it at least 15 or more times just to make sure.
Then I shut my computer down and when shopping for food. I get home; I turn on the computer, I ran the program and this is what I got just now:
Code:removeremoveThisremoveremove --- 1.txt
4 occurrences of 'remove' removed successfully. --- a fib
This --- result 2.txt
I think it is leaking memory or something. I think no one should test this code unless it is in a VM, already backed-up until we figure out what's going on. Before I went shopping it ran perfect. So it fooled the complier until a reboot or shutdown. I always anyway reboot or shutdown once I see that what I done is working. After a reboot or shutdown the truth come out. I seen that a few times during build of my C file. It told a fib. I fix it, and then reboot again until I know the complier got it right. Weard but true. Kernelpanic got it off the top. So GCC must work better on Windows or something.
One thing for sure, I now know how to connect files to those file-less examples so I can try others or anything. So this is not a total lost at all. I'm going to study the code now. I might learn something.