Right now I'm working on an assignment where I need to take the data from on file encrypt it by adding 5 to each byte and then save it to a user specified location. I think I'm close to having it done but I've run into a hick up. After I get the user input for where the encrypted data should be saved the program seems to never end. This is the code I have so far and any type of help is appreciated greatly.
I ran this code on my compiler and it ran fine. I'm thinking you input the file location wrong. Try adding this code after opening the file. If you get the error message then you know what your problem is.
1 2 3 4 5 6
cout << "The file failed to open" << endl;
oh and please use code tags when you post. There is a little menu on the right side of the screen when you post. The code tags button looks like this <>.