0
我想让玩家按任意键继续游戏,但不知道如何。这里是我到目前为止的代码:如何让玩家按任意键继续?
#include <iostream>
#include <string>
using namespace std;
int main()
{
cout << "\t\tWelcome to my first game, A Hero's Journey!\n\n";
char response;
cout << "\t\t\tPress any key to continue!: \n\n";
cin >> response;
if (response ==
return 0;
}
我目前工作的if语句,所以忽略,除非这就是我决定玩家是否已经按下的东西。
可能重复的[如何模拟“按任意键继续?”](http://stackoverflow.com/questions/1449324/how-to-simulate-press-any-key-to-continue) – Brian