stdin - C++: Infinite loop with a simple menu selection -
the script working on over page long, going link (one simple file):
http://pastebin.com/7bvhmqgp
i apologize that. problem infinite loop in code, example after select 1 or 2 encrypting/unencrypting lets me enter word, , when next enter "shift" cipher runs infinite loop of menu.
i had tried many hours debug this, thought problem cin, example when enter invalid choice throws infinite loop/
what seems cause infininte loops?
i think should ignoring newline character instead of space
i tried following , works on vs2010
cin.ignore(1, '\n'); getline(cin, input);
Comments
Post a Comment