C++: Infinite loop with a simple menu selection

后端 未结 3 520
-上瘾入骨i
-上瘾入骨i 2021-01-28 22:32

The script I am working on is over a page long, so I am going to link it (one simple file):
http://pastebin.com/7BVHmQGp

I apologize for that. My problem is I get in

3条回答
  •  伪装坚强ぢ
    2021-01-28 22:53

    Try cin.clear, I believe you are constantly reading your initial input character.

        cin >> selection;
        cin.clear(); 
    

提交回复
热议问题