@whitenite1
I got the spaces to work. I haven't tackled the # yet, but I had the same idea. For the '~' is that something I should learn to recognize meaning tab?
----------------
Score! I got it to solve the example in the OP. Now I need to make it solve
>7IETR BM LTF. HY TEE MAX ZBG CHBGML BG TEE MAX IETVXL BG TEE
MAX PHKEW, LAX ATW MH PTED >14UZFA YUZQ. IQ'XX MXIMKE TMHQ BMDUE.
>23URXQG XS WKH XVXDO VXVSHFWV.
to
PLAY IT SAM. OF ALL THE GIN JOINTS IN ALL THE PLACES IN ALL
THE WORLD, SHE HAD TO WALK INTO MINE. WE'LL ALWAYS HAVE PARIS.
ROUND UP THE USUAL SUSPECTS.
Right now my output is Enter filename: test1.txt
PLAY IT SAM. OF ALL THE GIN JOINTS IN ALL THE PLACES IN ALL THE WORLD, SHE HAD T
O WALK PUAV TPUL. DL'SS HSDHFZ OHCL WHYPZ. ¢d₧cY ₧e ¥]Z ₧£₧Va £₧£eZX¥£.
So now I am going to figure out why it goes crazy. My guess is that I something is wrong with my
1 2 3 4 5 6 7 8 9 10 11 12
|
if (ch<'A')
{
ch += 26;
cout << ch;
}
else if (ch>'Z')
{
ch -= 26;
cout << ch;
}
else cout << ch;
|
I think I just got lucky with my first example. Now the shift values are really big so +- 26 isn't going to work. I have a feeling I have to use my arch-nemesis the %. (This has screwed me over so many times ==)