I'm making a tic tac toe function that has a computer as the x (first player) and then the user as the o (second player). So far my code is:
#include <iostream>
#include <cmath>
#include <fstream>
using namespace std;
void nextMove()
{
}
void printBoard()
{
char board[3][3];
cout << board;
}
int main()
{
char o;
nextMove;
printBoard;
checkWin;
cout << "Please enter coordinates for your move: " << endl;
cin >> o
return 0;
}
In the function void nextMove I need to create a random number generator to put the x token on the array. I looked it up but didn't find much and I cant find the section in my book, also should I be using float for the o declaration to input coordinates?