while(!in.eof())
{
in >> ch;
char d = int(ch) + 10;
out << d;
}
while(!in.eof())
{
in >> ch;
char d = int(ch) - 10;
out << d;
}
The first while loop would be to encrypt it, and the second would decrypt it, the decrypting is not giving the original content. For example:
in = Hello
encrypt...
decrypt...
out = Hellooo