hey guys. I just started with c++ in hopes of slowly becomming a game programmer and i finished a game of Tic Tac Toe as instructed from a forum member. I didn't look up any programming tips on the process of creating tic tac toe (or any game theories) so my game might seem to be not too 'kosher'.
please check out my game. supposedly there shouldn't be any way of winning. and if theres a tie game, the program doesn't end (which i could easily fix, but im in a bit of a rush.) please let me know.

a) your thoughts of the game (any comments)
b) what the proper way to make a tic tac toe game would be (perhaps link)
c) where i should go next from here? or what i should do next to further understand game programming.

Code:
#include <iostream>
using namespace std;

void resetTable(char pTable[3][3]);
void printTable(char pTable[3][3]);
char checkTable(char pTable[3][3]);
void cmpp(char pTable[3][3]);

int main() {
    int clm, row;
    char tTable[3][3];
    char winner = 'a';

    resetTable(tTable);
    printTable(tTable);

    do{
        cout<<"Enter the row number then hit enter: ";
        cin>> row;
        cout<<"\nEnter the column number then hit enter: ";
        cin>> clm;
        if (tTable[row-1][clm-1] == ' ' && row < 4 && row > 0 && clm < 4 && clm > 0){
            tTable[row-1][clm-1] = 'x';
            cmpp(tTable);
            printTable(tTable);
            winner = checkTable(tTable);
        }
        else {
            cout<< "\nthat spot is either taken or is not a valid input.\nTRY AGAIN\n\n";
        }
    }while (winner == 'a');
    cout << "\n\nthe winner is: " << winner;
    cin.get();
    return 0;
}



/////////////////Computer AI////////////////
void cmpp(char p2Table[3][3]){
    char check = 'a';
    int checktww = 0;
///////////// if Computer is about to win. then take that spot ///////////////
    if (check == 'a'){
        for (int i = 0; i < 3; i++) {
            for (int j = 0; j < 3; j++) {
                if (p2Table[i][j] == ' '){
                    p2Table[i][j] = 'o';
                    check = checkTable(p2Table);
                    if (check == 'o'){
                        p2Table[i][j] = 'o';
                        break;
                    }
                    else {
                        p2Table[i][j] = ' ';
                        check = 'a';
                    }
                }
                if (check != 'a'){
                    break;
                }
            }
            if (check != 'a'){
                break;
            }
        }
    }
///////////// If player is about to win. take the spot that stops him ///////////////

    if (check == 'a'){
        for (int i = 0; i < 3; i++) {
            for (int j = 0; j < 3; j++) {
                if (p2Table[i][j] == ' '){
                    p2Table[i][j] = 'x';
                    check = checkTable(p2Table);
                    if (check == 'x'){
                        p2Table[i][j] = 'o';
                        break;
                    }
                    else {
                        p2Table[i][j] = ' ';
                        check = 'a';
                    }
                }
                if (check != 'a'){
                    break;
                }
            }
            if (check != 'a'){
                break;
            }
        }
    }
///////////////Checks if cener square is taken////////////////
    if (p2Table[1][1] == ' ' && check == 'a'){
        cin.get();
        p2Table[1][1] = 'o';
        check = 'o';
    }
////////////Checks if user picked 2 diagnal oposing squares////////////
    else if (p2Table[0][0] == 'x' && p2Table[2][2] == 'x' && check == 'a' || p2Table[2][0] == 'x' && p2Table[0][2] == 'x' && check == 'a'){
        cin.get();
        p2Table[0][1] = 'o';
        check = 'o';
    }

//////////Checks if any posibility for a two way win for Player///////////
    else if (check == 'a'){
        cin.get();
        for (int i = 0; i < 3; i++) {
            for (int j = 0; j < 3; j++) {
                checktww = 0;
                if (p2Table[i][j] == ' '){
                    p2Table[i][j] = 'x';
                    for (int k = 0; k < 3; k++) {
                        for (int l = 0; l < 3; l++) {
                            if (p2Table[k][l] == ' '){
                                p2Table[k][l] = 'x';
                                check = checkTable(p2Table);
                                if (check == 'x'){
                                    checktww = checktww + 1;
                                    if (checktww == 2){
                                        p2Table[i][j] = 'o';
                                        p2Table[k][l] = ' ';
                                        check = 'o';
                                        break;
                                    }
                                }
                                if (p2Table[i][j] == 'o'){
                                    p2Table[k][l] = ' ';
                                    break;
                                }
                                check = 'a';
                                p2Table[k][l] = ' ';
                            }
                        }
                    }
                    if (check != 'a'){
                        break;
                    }
                    p2Table[i][j] = ' ';
                }
                if (check != 'a'){
                    break;
                }
            }
            if (check != 'a'){
                break;
            }
        }
    }
////////////all else fails pick first available spot///////////
    if (check ==  'a'){
        for (int i = 0; i < 3; i++){
            for (int j = 0; j < 3; j++){
                if (p2Table[i][j] == ' '){
                    check = 'o';
                    p2Table[i][j] = 'o';
                    break;
                }
            }
            if (check != 'a'){
                break;
            }
        }
    }
}

/////////////Looks for a winner///////////////////
char checkTable(char pTable[3][3]){
    char wnr = 'a';
    for (int i = 0; i < 3; i++){
        if (pTable[i][0] == pTable[i][1] && pTable[i][0] == pTable[i][2] && pTable[i][0] != ' '){
            wnr = pTable[i][0];
            break;
        }
        else if (pTable[0][i] == pTable[1][i] && pTable[0][i] == pTable[2][i] && pTable[0][i] != ' '){
            wnr = pTable[0][i];
            break;
        }
    }
        if (pTable[0][0] == pTable[1][1] && pTable[0][0] == pTable[2][2] && pTable[0][0] != ' '){
            wnr = pTable[0][0];
        }
        else if (pTable[2][0] == pTable[1][1] && pTable[2][0] == pTable[0][2] && pTable[2][0] != ' '){
            wnr = pTable[2][0];
        }
    return wnr;
}

//////////////////////incase you want to start the game over/////////////
void resetTable(char pTable[3][3]) {
    for (int i = 0; i < 3; i++) {
        for (int j = 0; j < 3; j++) {
            pTable[i][j] = ' ';
        }
    }
}

///////////////////display Tic Tac Toe Table///////////////////
void printTable(char pTable[3][3]) {
    system("CLS");
    cout<<"  1  2  3\n";
    cout<<" =========\n";
    for (int i = 0; i < 3; i++) {
        cout<< i+1 ;
        for (int j = 0; j < 3; j++) {
            cout << "|"<<pTable[i][j]<<"|";
        }
        cout<<"\n =========\n";
    }
}



////////I Hope I'm Done//////////