[try Beta version]
Not logged in

 
 
Reading file including already set byte shift?

Oct 27, 2011 at 5:07am
Hello, fellow programmers!

I was wondering if it could be possible to read a file including byte shift in C++. Here's an example:

example.txt
Hello, world!


This shouldn't be too complicated to read using ifstream. But if I'll do a byte shift (using value 55 for example), how can I convert the contents of this file...

example.txt (Input file):

œ££¦cW®¦©£›X


..into form that I can understand as a human being into my program?
Oct 27, 2011 at 7:09am
Huh? Just read the file normally and do the shifting
Oct 27, 2011 at 9:30am
Could you please elaborate?
Oct 27, 2011 at 12:03pm
A char is just a number. You can add 55 to each character.
Oct 28, 2011 at 10:50am
OK, I see. Then I guess I have understood byte shifting. Thanks a lot!
Topic archived. No new replies allowed.