C++: Infinite loop with a simple menu selection

后端 未结 3 562
-上瘾入骨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:58

    I think you should be ignoring the newline character instead of a space

    I tried with the following and it works on VS2010

        cin.ignore(1, '\n');
        getline(cin, input);
    

提交回复
热议问题