// functions.cpp #include "stdafx.h" #include "declare.h" //initalizate the board void Init(char *arr) { for(int i = 0;i < 9;i++) { arr[i] = i+100; } } //prints the board void Print(char *arr) { cout<<"this is the real board"< using namespace std; //functions void Init(char *arr); void Print(char *arr); int CheckWinnerX(char *arr); int CheckWinner0(char *arr); #endif //main.cpp #include "stdafx.h" #include "declare.h" int main() { char board[9]; char *pBoard = &board[0]; Init(pBoard); Print(pBoard); int check = 0; //checking if there is any winner cout<<"pls, choose between you who is the x anad who is the 0"<>numBox; board[numBox-1] = 'X'; Print(pBoard); check = CheckWinnerX(pBoard); if(check != 0) continue; cout<<"0 pls enter number which represents the box you have chosen"<>numBox; board[numBox-1] = '0'; Print(pBoard); check = CheckWinner0(pBoard); if(check != 0) continue; } // cout<<"Nice game,the winner is: "<< return 0; }