所以我正在尝试将代码放在一起用于我的作业分配,并且出于某种原因,我在我的while循环条件下不断得到预期的表达式错误,我将<= end_money部分放在一起.错误显示在<=上.这是我的代码中唯一一个我收到此错误的地方.如果有人能帮助我,我会非常感激.我被困了这么久.这是片段:编辑:还有一个while循环的结束括号,我只是忘了将它粘贴在这里.
int player_total = 0;
int dealer_total = 0;
int player_bet;
int card_value = 0;
const int end_money = 1000;
const int starting_money = 100;
string card;
string response;
while (player_bet >= 0 && <= end_money)
{
cout << "You have $100. Enter bet: ";
cin >> player_bet;
if (player_bet <= starting_money) {
return true;
}
else if (player_bet > starting_money) {
cout << "You only have $100 to bet. Enter bet: ";
}
Run Code Online (Sandbox Code Playgroud)