I too had made a one program that did the same.
Here's a few tips:
1. Have a look at the ASCII list in Wikipedia :
http://en.wikipedia.org/wiki/ASCII
2.Refer to it to keep track of the Numerical values of the Characters.
3. Use strings rather than Arrays.
i.You should use the for loop, with the condition:
i < string.size();
ii.The above condition will loop until
i equals the size of the string
iii.You need to use
[] to access individual characters. This is same as in Arrays
iv.Don't create two strings, rather use only one, just overwrite the previous
v.Use
if
else
statements to check if the character goes beyond the numerical alphabet limit and perform the calculations to change it back to the first version.
4.As the abve poster said, include
iostream