Tic Tac Toe game in C++ 11 It's time for my second simple game - Tic Tac Toc. I checked it on my Linux and it's working. For compiling it I used g++ with -std=c++11. I will be glad for any advice for the future.

#include &lt;iostream&gt;
#include &lt;cstdlib&gt;
#include &lt;unistd.h&gt;

class Game_Board
{
public:
    Game_Board();

private:
    enum Player{cross=1, circle=2};
    Player which_player = cross;
    int table_board[3][3];
    bool end = false;

//drawing board
    void draw_board(int const table_board[3][3])
    {
        system("clear");
        for (int i = 0; i&lt;3; i++)
        {
            std::cout &lt;&lt; "\n";
            for (int j = 0; j&lt;3; j++)
            {
            if(table_board[j][i]==1)
            {
                std::cout &lt;&lt; " _X_ ";
            }
            else if(table_board[j][i]==2)
            {
                std::cout &lt;&lt; " _O_ ";
            } else
            {
            std::cout &lt;&lt; " ___ ";
            }
            }
            std::cout &lt;&lt; "\n\n";
        }
    }

//reading player move
    void read_move()
    {
        int *p_moveX = new int;
        int *p_moveY = new int;
        std::cout &lt;&lt; "\nChoose a field (Player " &lt;&lt; which_player &lt;&lt; "): ";
        std::cin &gt;&gt; *p_moveX &gt;&gt; *p_moveY;
        write_move(*p_moveX, *p_moveY, which_player);
        delete p_moveX; p_moveX = NULL;
        delete p_moveY; p_moveY = NULL;
    }

//saving player's move to table
    void write_move( int X, int Y, int plr_number)
    {
        if(table_board[X-1][Y-1]!=0 || X&lt;=0 || Y&lt;=0 || X&gt;3 || Y&gt;3)
        {
            std::cout &lt;&lt; "You can't do this!";
            read_move();
        }
        else
        {
        table_board[X-1][Y-1] = plr_number;
        }
    }

//checking end of game
    void check_winner()
    {
    int *end_counter = new int;
    *end_counter = 0;
        for( int i = 0; i&lt;3; i++)
        {
            if((table_board[i][0] &amp; table_board[i][1] &amp; table_board[i][2])!=0 ||(table_board[0][i] &amp; table_board[1][i] &amp; table_board[2][i])!=0 || (table_board[i][0] &amp; table_board[i+1][1] &amp; table_board[i+2][2])!=0 || (table_board[i][2] &amp; table_board[i+1][1] &amp; table_board[i+2][0])!=0)
            {
                switch(which_player)
                {
                    case 1:
                    draw_board(table_board);
                    std::cout &lt;&lt; "Player 1 wins!\n";
                    end = true;
                    break;

                    case 2:
                    draw_board(table_board);
                    std::cout &lt;&lt; "Player 2 wins!\n";
                    end = true;
                    break;
                }

            }
        }
        for( int i = 0; i&lt;3; i++)
        {
            if(table_board[i][0]!=0 &amp;&amp; table_board[i][1]!=0 &amp;&amp; table_board[i][2]!=0)
            {
                    *end_counter+=1;
                    if(*end_counter==3)
                    {
                    draw_board(table_board);
                    std::cout &lt;&lt; "Only God wins!\n";
                    end = true;
                    }
            }
        }
        delete end_counter;
        end_counter = NULL;
    }

//choosing player
    void choose_player()
    {
        if(which_player==1)
        {
            which_player = circle;
        } else {
            which_player = cross;
        }
    }

//clearing table
    void clear_table()
    {
        for(int i=0; i&lt;3; i++)
        {
            for(int j=0; j&lt;3; j++)
            {
                table_board[i][j]=0;
            }
        }
    }
};

Game_Board::Game_Board()
{
    clear_table();
    while(!end)
    {
    draw_board(table_board);
    read_move();
    check_winner();
    choose_player();
    }
}

int main()
{
    Game_Board game;
    return 0;
}
I would recommend making a main game loop. Running a loop in a constructor breaks the fundamental contract of a constructor: to construct something. This change will also allow you to easily restart the game and keep track of score if you wish. With that said, adding a StartGame, RestartGame and EndGame functionality may help organize things.

I tend to shy away from enums. If I find myself needing an enum, I always end up realizing I actually want a class. This follows the S in SOLID: single responsibility.

There is a line of code in check_winner that goes well over 100 columns. I would wrap the line after every few boolean operators in an if statement like this.

if((table_board[i][0] &amp; table_board[i][1] &amp; table_board[i][2])!=0
  || (table_board[0][i] &amp; table_board[1][i] &amp; table_board[2][i])!=0
  || (table_board[i][0] &amp; table_board[i+1][1] &amp; table_board[i+2][2])!=0
  || (table_board[i][2] &amp; table_board[i+1][1] &amp; table_board[i+2][0])!=0)
{
...
}


You seem to be using the new operator where you don't need to. All of this can be done on the stack with less lines of code and less work for the processor. Every time you call new, the CPU has to find new space on the heap, construct the datatype and return the pointer to the memory address. Considering how small this program is, it's likely all your data could fit in the registry directly on the CPU.

void read_move()
{
    int moveX = 0;
    int moveY = 0;
    std::cout &lt;&lt; "\nChoose a field (Player " &lt;&lt; which_player &lt;&lt; "): ";
    std::cin &gt;&gt; moveX &gt;&gt; moveY;
    write_move(moveX, moveY, which_player);
}


check_winner also has a similar problem.

draw_board does not need to take in a table_board because it is already accessible as a member, also I would avoid giving function parameter the same names as members. I'd recommend putting a lowercase 'm' before your member variables and using pascal case.

After the appropriate code changes, you shouldn't have any pointers in your code, but just as a side note:

nullptr is now the standard for assigning pointers to null in C++11. nullptr is of type std::nullptr_t where NULL is an int.