connect four program
<p>I am doing a "Connect 4" program for my assignment and i've done the main part, which I should not change (my lecturer told me not to). The function needs to return 1 if someone wins and 0 if someone does not. I can not figure this out and have been working for weeks on this project!</p>

<p>i'm so very sory.i was too busy with my digital system and my database system assignments that i totaly spaced out on this one.i'm kinda stuck in my verticalwin/horizontalwin/diagonalwin function and i also need help to do a function wen all the tiles is filled up,so an output such as "It's a tie" to appear.
my assignment is due 2mr.plz help me. </p>

<p>Here's my program so far:</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;fstream&gt;

using namespace std;

void drawboard(ostream &amp;, char [6][7], int, int);
int humanmove(int player, char board [6][7], int rows, int columns);
int verticalwin(char board[6][7], int rows, int columns, int moverow, int movecolumn);

int main ()
{

    cout&lt;&lt; "Connect Four is a two-player game in which the players first ";
    cout&lt;&lt; " choose a letter   and then take turns dropping their letters from the top into a seven-column,";

    cout&lt;&lt; "    six-row vertically-suspended grid.";

    cout&lt;&lt; " The pieces fall straight down, occupying the next available space within the column. ";

    cout&lt;&lt; " The objective of the game is to connectfour of one's own discs of the same color next to each other vertically,        horizontally, or diagonally before one's opponent can do so. ";

    ofstream outfile;
    outfile.open("gamelog01.txt");
    char board[6][7] = {0};

    int player;
    int row;
    int col;
    int times;
    bool win; 
    int moverow;
    int movecolumn;

    drawboard(cout, board,6,7);

    while (player = 1)
    {
        humanmove(player, board, 6, 7);
        verticalwin(board, 6, 7, moverow, movecolumn);

        player = 2;
        humanmove(player, board, 6, 7);
        verticalwin(board, 6, 7, moverow, movecolumn);
    }

    outfile.close();
    return 0;
}

//-------------------------------------------------------------

void drawboard  (ostream &amp; out, char b[6][7], int r, int c)
{
    out &lt;&lt; endl;
    for (int x = r-1; x &gt;= 0; x--)
    {
        out &lt;&lt; "  |";

        for (int y = 0; y &lt; c-1; y++)
            out &lt;&lt; "----";

        out &lt;&lt; "---|" &lt;&lt; endl &lt;&lt; x &lt;&lt; " |";

        for (int y = 0; y &lt; c-1; y++)
            if (b[x][y] == 0)
                out &lt;&lt; "   |";
            else
                out &lt;&lt; " " &lt;&lt; b[x][y] &lt;&lt; " |";

        if (b[x][c-1] == 0)
            out &lt;&lt; "   |" &lt;&lt; endl;
        else
            out &lt;&lt; " " &lt;&lt; b[x][c-1] &lt;&lt; " |" &lt;&lt; endl;
    }

    out &lt;&lt; "  |";

    for (int y = 0; y &lt; c-1; y++)
        out &lt;&lt; "----";

    out &lt;&lt; "---|" &lt;&lt; endl; 
    out &lt;&lt; " ";

    for (int y = 0; y &lt; c; y++)
        out &lt;&lt; "   " &lt;&lt; y;

    out &lt;&lt; endl;
}

int humanmove  (int player, char board[][7], int rows, int columns)
{
    char symbol;

    if(player == 1)
        symbol = 'X';
    else
        symbol = 'O';

    int col;
    cout &lt;&lt; "What column would Player " &lt;&lt; player &lt;&lt; " like to play in?: " ;
    cin &gt;&gt; col;

    while ((col &lt; 0) || (col &gt;= columns))
    {
        cout &lt;&lt; "Invalid selection. There aren't that many columns. Please enter a different    column number: ";
        cin &gt;&gt; col;
    }

    int row;
    for(row = 5; row &gt;= 0; row--)
    { 
        if(board[row][col] != 0)
            break;
    }

    board[row+1][col] = symbol;

    if (row == 'X' || row == 'O')
    {
        cout &lt;&lt; "Column " &lt;&lt; col &lt;&lt; " is full. Please choose another: ";
        cin &gt;&gt; col;
    }
    else 
    {
        drawboard(cout, board, 6, 7);
    }
}

int verticalwin  (char board[6][7], int rows, int columns, int moverow, int movecolumn)
{
}
</code></pre>
