Program skips second cin

前端 未结 4 1560
感动是毒
感动是毒 2021-01-16 12:03

I\'m making a C++ Mind Reader program, which is nearly complete. However, it feels the need to skip the second cin. I\'ve searched and I\'m not exactly sure what\'s wrong. I

4条回答
  •  执笔经年
    2021-01-16 12:36

    cin.get();
    cout << "Now please enter the country you are in at the moment:\n\n";
    cin >> country; //<------ Line 32
    

    type cin.get() before cout as I have done above and your problem will be resolved.

提交回复
热议问题