Frankie,
That did it! Thank you very much !
Yes, file0 was a char variable for file0.txt in my file.
Ok, I made careful note of all that you said. Thank you for the detailed intstruction. It means a lot to me,
and I will remember you as I use NULL instead of 0 (afraid I have been doing a lot of that in other functions too).
Super, the ReplaceFile function is working in my more complex file just fine.
I saw your response as I was about to post a source file example which proved there was more than the
open/write/close on the files file0.txt and file1.txt involved. I had made a simple source file which very simply
performed one i/o write for each file, and the ReplaceFile function worked ... I was then wondering if the problem
was using the function from the Switch case section of my "more complex file".
Your input solved everything, and I would have continued to troubleshoot in the wrong direction, and probably
have given up on the ReplaceFile function. I was confused by it working in a simple situation
then not where I wanted it to work.
Again thanks, appreciate it Frankie,
...... Ed