Hello all, I am trying to make a player vs computer tic tac toe game, and it runs a couple turns and then gets an error:
Unhandled Exception: 0xC0000005: Access Violation writing location 0x00390F94
within the time.h library
Here is my code for the member function so far... it works so far up to this point
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#define SEED NULL
.
.
.
char Draw::randomCell()
{
int random;
//makes the seed time different every time it is run
srand(time(SEED));
random = 1 + (rand() % (57 - 48) + 48); //picks a random number from 1-9
char randomChar = static_cast<char>(random); //converts random number to applicable char
if (!isSame(randomChar))
return randomChar;
else
randomCell();
}