到目前为止,这是我的代码:
while(bet > remaining_money || bet < 100)
{
cout << "You may not bet lower than 100 or more than your current money. Characters are not accepted." << endl;
cout << "Please bet again: ";
cin >> bet;
}
它工作正常,但我试图弄清楚如果用户输入任何不是数字的东西,如何让它循环。
当我按下一个字母或说出一个符号/符号时,密码就会中断。