【发布时间】:2014-03-19 05:15:39
【问题描述】:
我想让玩家按任意键继续游戏,但不知道怎么做。这是我到目前为止的代码:
#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 语句,所以不要理会它,除非我决定玩家是否按下了某些东西。
【问题讨论】:
标签: c++ user-input