小编joe*_*joe的帖子

为什么这一行给我一个c2120错误

} 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)

c++ compiler-errors

-1
推荐指数
1
解决办法
203
查看次数

为什么我总是收到形式参数重新定义错误

#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)

c++ user-defined-functions redefinition

-2
推荐指数
1
解决办法
1万
查看次数