I started this code, and it does encode the text, however it only does the first line of text and repeats it. It is also encoding spaces.
#include <fstream>
#include <iostream>
#include <string>
using namespace std;
int main()
{
ifstream fin;
string fileName;
cout << "What file do you want to use for input? ";
getline(cin, fileName);
fin.open(fileName.c_str());
string s;
while (true)
{
if (!fin.good()) break;
getline(fin, s);
string s = "Hello, World"; // an example
for (int i = 0; i < s.length(); i++) // for each char in the string...
s[i]++;
cout << s << endl;
}
fin.close();
return 0;
}