For one, don't use a character array to get direct input while also using cin. It tends to be... messy. In fact, that is exactly what is going on here. So, for the changes:
Make user[100] into string user. This isn't C, after all.
What's all the '(i%91)+counter' business for in your indexing?
The wording of your question and your description of the problem seem a bit ambiguous. MOVING a character implies changing it's position within the array, but the description you gave suggests that you don't want to move it, just change it's value.
in either case the above indexing seems completely bizarre. I think what you were going for is just a straightforward user[i]+=counter;
Hi
I think you should first change that input "cin >> user; to "cin >> user[0]; if u just want to use one element of the array. By the way, how can you say enter a word when you declared it as a character? I think you should prompt the user to enter a letter and not a word.
I have no idea that's why I'm asking... I'm not doing a cipher but yes you could see it that way but numbers and special characters must stay the same so @jasonwynn117 , it's not fully correct.
@cire : I think it has to do with string to char conversion or vice-versa.
Ok first of all I'm dumb because the loop was running but I didn't use cout to print the array =='
@cire : I think it has to do with string to char conversion or vice-versa.
If we take a short visit to: http://ideone.com/1z2vvK and add some output we can see that the string after the for loop runs is different than the string before the for loop ran... so what makes you think the for loop isn't running?
Thanks cire, I've fixed the problem already. Now another problem arises is that I want to compile 2 c++ source files and a header in Eclipse... How do I do that?