problems with my tic tac toe game
I have already written a tictactoe, but im doing it again because before i had all global variables. im not far right now on the new one, and im having some problems.
Code:
#include <iostream.h>
void InitiateBoard(char Board[4][4]);
void PlayerMove();
void ComputerMove();
void UpdateDisplay(char Board[4][4]);
void CheckForWin();
int main()
{
//Create Variables
char Board[4][4];
InitiateBoard(Board);
UpdateDisplay(Board);
return 0;
}
void InitiateBoard(char Board[4][4])
{
int count=0; //Set as numbers so the user
for(int a=1;a<=3;a++)//can just put what number
{ //of the spot they want.
for(int b;b<=3;b++)
{
count++;
Board[a][b]=static_cast<char>(count);
}
}
}
void UpdateDisplay(char Board[4][4])
{
for(int a=1;a<=3;a++)
{
cout<<Board[a][1]<<" "<<Board[a][2]<<" "<<Board[a][3]<<endl;
}
}
i run it and a windows error pops up and gives me the "send" or "dont send" stuff (xp usere know what im talking about). it doesnt display anything in the console window, just "press any key to continue". also, when i pass arrays to functions, they are automatically converted to pointers, right?