小编use*_*558的帖子

我可以在 IF 语句中将比较链接在一起吗?

我目前正在为大学制定一个零和交叉的计划。我已经完成了这项任务的基本内容,但是我在创建获胜条件来结束游戏时遇到了一些麻烦。以下是我迄今为止使用过的所有代码:

#include <iostream>
#include <string>

using namespace std;

class Player
{
private:
    char NorX;

public:

    char Choose(char InitialValue)
    {
        NorX = InitialValue;
        return InitialValue;
    }

    char GetNorX()
    {
        return NorX;
    }
};

int main()
{
    Player Player1;
    Player Player2;

    Player1.Choose('O');
    Player2.Choose('X'); 

    cout << "The board is being drawn please wait..." << endl;

    const int Rows = 4;
    const int Columns = 4;
    char Board[Rows][Columns] = { {' ', ' ', ' ', ' ' },
                                  {' ', '_', '_', '_' …
Run Code Online (Sandbox Code Playgroud)

c++ syntax

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

标签 统计

c++ ×1

syntax ×1