} while (mf_bingo(c) != 5);
Run Code Online (Sandbox Code Playgroud)
这是我不断收到错误的那一行.我尝试在mf_bingo(c)之前放一个空格并取出(c)
编辑:这是完整的循环
do
{
char yesNo;
int c, d;
if (yesNo == 'y' || yesNo == 'Y')
{
cout << "Player 1 how many numbers are on your card" << endl;
cin >> c;
mf_bingo(c);
}
else if (yesNo == 'n' || yesNo == 'N')
{
cout << "Sorry player 1" << endl;
}
cout << "Player 2 do you see this number on your card." << endl;
cin >> yesNo;
if (yesNo == 'y' …Run Code Online (Sandbox Code Playgroud) #include <iostream>
using namespace std;
void mf_option(int player1, int player2);
void mf_option2(int player1, int player2);
void mf_option3(int player1, int player2);
int main()
{
int player1, player2;
cout << "\n\n\nWlcome to \"Rock Paper Scissor game\"\n";
cout << " Type 0 for rock, 1 for paper , and 2 for scissors\n";
cout << "Player 1, choose 0, 1 or 2: ";
cin >> player1;
system("clear");
cout << " Type 0 for rock, 1 for paper , and 2 for scissors\n";
cout << …Run Code Online (Sandbox Code Playgroud)