Press Enter to Continue

前端 未结 7 1891
南笙
南笙 2020-12-05 02:08

This doesn\'t work:

string temp;
cout << \"Press Enter to Continue\";
cin >> temp;
7条回答
  •  佛祖请我去吃肉
    2020-12-05 02:35

    You need to include conio.h so try this, it's easy.

    #include 
    #include 
    
    int main() {
    
      //some code like
      cout << "Press Enter to Continue";
      getch();
    
      return 0;
    }
    

    With that you don't need a string or an int for this just getch();

提交回复
热议问题