title: Tic-Tac-Toe how do i call a 2d array in a function?
body: <p>So i'm making a tic tac toe game and i ran into a problem, what works atm:</p>
  
  <ul>
  <li>The board</li>
  <li>Input into board</li>
  <li>Board updates upon user input</li>
  </ul>
  
  <p>What doesn't work:</p>
  
  <ul>
  <li><p>Win detection, (basically i have a function which is supposed to take board 2d array and then find out if the game has ended or not and that doesn't work for me) </p></li>
  <li><p>How would i call this function</p></li>
  <li><p>Are there any improvements to the code i currently have?</p>
  
  <pre><code>bool GameState(char a[3][3], bool gameOver)
  </code></pre></li>
  </ul>
  
  <p>Github: <a href="https://github.com/MrCappucino/Tic-Tac-Toe/blob/master/main.cpp" rel="nofollow">https://github.com/MrCappucino/Tic-Tac-Toe/blob/master/main.cpp</a></p>
  
  <p>EDIT: the function works fine now, code updated, but now it won't register winning states</p>
  
  <p>EDIT 2: The win detection works, BUT now it only detects it 1 turn after it should be registering, kinda hard to explain so i'll give an example: x's are filled in 1, 5 and 9 (making a diagonal line from top-left to bottom-right) and registers the win only 1 turn later after o moves.</p>