i am having trouble trying to convert a 0 or 1 into an X or O.
here is my print function of the program
Code:
char print(int row1col1, int row1col2, int row1col3)
{
char X;
char O;
if (row1col1 == 1)
row1col1 = X;
else row1col1 = O;
if (row1col2 == 1)
row1col2 = X;
else row1col2 = O;
if (row1col3 == 1)
row1col3 = X;
else row1col3 = O;
printf("\n|%s| |%s| |%s|", row1col1, row1col2,
row1col3);
}
when i dont try and convert, i get a randomly selected 0 and 1's so i know i am creating it right but when i use the if else above i get a
|(null)| |(null)| |(null)| as output. so please help.....