Just to be a bit more contsructive, try this:
Code:#include <iostream.h> int loop() { int a; char b, c; cin>> b; a = int(b); cout<<a<<endl; a<<=1; // bitshift with 1 to left cout<<a<<endl; a>>=1; // bitschift with 1 to right cout<<a<<endl; c = char(a); cout<<c<<endl; loop(); return 0; } int main() { loop(); return 0; }
if for example, you type "g", that reads 103, when you bitshift 103 1 to the left, you get 206. If you bitshift 206 back 1 to the right, you get 103 again, which is "g".
So what you do is, when saving, bitshift every character you write to the file, to the left or the right by a certain amount. In the case of a "g" you would get 206. That's what you write to the file. So you only end up with numbers. When you then load the file, you do the same thing, but in the other direction and you end up with a "g" again. May take some time, but nobody will understand what the file contains.