I am working on an assignment for my intro to programming class. The program is supposed to read input from a file, encrypt it, then write the encrypted data to a new file. The code is still a work in progress, but I've reached a major roadblock.
I'm using a for loop to encrypt each character in a line individually. Every time I try to run the program, I get a fatal error in this for loop, saying that the string subscript is out of range. I have been working on this error for the better part of two hours, and cannot see anything different about this loop than any other for loop I've written in the past.