I'm having some odd problems with this program. There's an odd smiley face thingy appearing on the board as well as the get_status function is not working properly. Copy and compile this if you want, and please tell me what the hell the problem is. I'm very new to computers and programming in general. Thanks.
#include <iostream>
#define X 'X'
#define Y 'O'
using namespace std;
void next_move(char[][3]); // player one's move
void next_mmove(char[][3]); // player two's move
bool set_value(char[][3], int row, int column); // check valid move
void display_board(char[][3]); // board
int get_status(char[][3]); // win, lose, or tie (havent finished yet)
int main()
{
char name1, nname;
cout << "enter your name player 1: ";
cin >> name1;
fflush(stdin);
cout << endl;
cout << "enter your name player 2: ";
cin >> nname;
fflush(stdin);
cout << endl;
well, thats not really the problem, allow me to explain a bit further. I set all board values to null, because the professors specifications said set a blank and valid spot equal to null. Now, whenever i enter the [row][column] cordinates for input, it will put an X or O respectively for player 1 and 2. Now once that spot becomes an X or O, it should no longer be null, therefore when i call the set_value function, it should recognize that as a taken position. It does not. I can replace any X with an O and vice versa. Also there are odd markings on the display board, and it messes up the entire board. another problem is the Get_status function is recognizing player one as the winner before i even complete a game, after the first round of player 1 and player 2 moves. I have no idea what to do.