So it's triggering a debug assertion? That should make it pretty easy to debug. Use your debugger to find out which line the assert is triggering on, and what the state of the memory is at that point. That should give you some pretty good clues as to what's going wrong.
@ OP: Do you know what this error means? As in what it indicates? Because that is probably the first step in understanding this problem. The problem you're looking for is a small oversight, it's actually a pretty common beginner mistake. Yes, I have found it and I suspect that MikeyBoy has as well.
EDIT: Ask yourself why this only happens when you select the "Decrypt" option.
@ OP: Really? Your program is only meant to encrypt the first letter of the string? That's more of an obfuscation wouldn't you say?
EDIT: Also, why are you isolating that particular for loop (yet not the inverse encryption section of it)? I agree that isn't impacting anything but it's weird to look at. It also suggests that you either didn't put them there on purpose or you put them there and you don't know why.
Yes, I have run the program and no, it does not encrypt all of the letters not as you have it posted above with the only change being the removal of the semicolon. For instance "Banana" changes into "Ganana". You posted this at 1:00 AM EST so is it possible you've made more changes and not updated it since then?
@OP: I am trying to help you here, but if you want me to go away I will. We can forget about the curly brackets at Lines 34 and 49, they aren't doing anything but at the same time they aren't doing anything.
If you're only trying to encrypt capitol letters then yes it works, but I don't see that mentioned anywhere.
"Lol", the guy running the program can't see your comments.
I'll admit that I missed that because of the color I have Code::Blocks set to display comments with two slashes, but what you have here is not a good solution and you would be docked points on an assignment for that. Even if you wanted to be lazy about it, you could use "toupper()" to make the users input into all capitol letters. But why aren't you encrypting lower case letters anyway?