Original Post
Hey I'm quite new to this site and programming itself. I was wondering if anyone could help me fix this problem. Basically user inputs a string of characters and it encrypts it by moving each character up 3 in the alphabet. The current program spits aload of symbols after it encrypts and I don't know why. Appreciate if anyone can help. #include "stdafx.h" #include #include using namespace std; int main () { string str; char encrypt[40]; int i = 0; int offset; int choice; cout << "Enter a '1' to encrypt a message and a '2' to decrypt a message.\n"; cin >> choice; cout << "What message would you like to encrypt/decrypt?\n"; cin >> str; cout << "What do you want your offset number to be?\n"; cin >> offset; for(int i = 0; i < str.length(); i++) { encrypt = str.at(i); } if (choice = 1) { while(i = int(encrypt) + offset; i++; } } else (choice =2); { while(i = int(encrypt) - offset; i++; } } cout << encrypt <