C++ Hangman program check if work function
<p>This is the program i have so far it compiles but outputs are wrong. I'm trying to fix this function that compares two arrays and returns true if they are equal and false if not. </p>

<pre><code>bool CheckWon ( char selectedWord[], char gameBoard[] )
{
    bool checkWon = false;
    int length = strlen(selectedWord);

    for (int i = 0; i &lt; length; i++)
    if ( strcmp( gameBoard[i], selectedWord[i] ) == 0)
        checkWon = true;

    return checkWon;
}
</code></pre>
