I'm working on a practice program for encryption and decryption. I've recently been trying to teach myself C++, so please bear with me.
I want to read in a text file, ask the user how many characters he/she wants to rotate, and then rotate accordingly.
I've been running into a lot of problems while trying to do this. Finally, I have somewhat working code for this part.
My program now actually rotates and prints out the correct rotated character. However for some characters it is printing a } or even a Chinese character. I also have to rotate numbers for dates such as 2016 etc. I also have no spaces.
I know in my program I directly printing out ch, which is probably a big part of the error. I am not sure how to include spaces between the words and make sure it is using the correct rotated character.
I will post the function below. My program is a lot larger and I've been working on other parts but I won't post it all so it is more concise. Thank you in advance, I really appreciate the help. I've spent days trying to figure this out and certainly need the help.