title: C++: Infinite loop with a simple menu selection
body: <p>The script I am working on is over a page long, so I am going to link it (one simple file):<br>
  <a href="http://pastebin.com/7BVHmQGp" rel="nofollow">http://pastebin.com/7BVHmQGp</a></p>
  
  <p>I apologize for that. My problem is I get into an infinite loop in my code, for example after I select 1 or 2 for encrypting/unencrypting it lets me enter the word, and when I next enter the "shift" for the cipher it runs an infinite loop of the menu.</p>
  
  <p>I had tried for so many hours to debug this, I thought it was a problem with <code>cin</code>, for example when you enter an invalid choice it just throws an infinite loop/</p>
  
  <p>What seems to cause the infininte loops?</p>