Write a C++ program that reads text from a file and decodes the file by subtracting 5 from the ASCII value of each character.
1. Read the text file one line at a time.
2. Change each character of the string by subtracting 5 from it.
3. Write the encoded string to a second file, such as plain.txt
it works, except that it repeats the last line of code twice. I need to read it to read the line, then check for the end of the file before processing. Any help would be greatly appreciated.