Snippets of code..
Code:
void onePlayer() {
TicTacToe game;
playSingleGame( player1, player2, count, difficulty, &game );
}
void playSingleGame( int p, int p2, int number, int diff, TicTacToe *ttt ) {
compAI( &row, &column, ttt );
}
void CompAI( int *x, int *y, TicTacToe *ttt ) {
int b1;
b1->ttt.getBoard( 0, 0 );
}
There is obviously much more code in each of the functions, it's just that the compiler won't compile my program successfully. However if I comment out the call to compAI in function playSingleGame the program will compile.
Building Makefile: "C:\Documents and Settings\Dylan v.d Merwe\My Documents\Coding\C++\Work\Complete Projects\TicTacToe\Makefile.win"
Executing make...
make.exe -f "C:\Documents and Settings\Dylan v.d Merwe\My Documents\Coding\C++\Work\Complete Projects\TicTacToe\Makefile.win" all
g++.exe main.o tictactoe.o -o "tictactoe-game.exe" -L"C:/Program Files/Dev-Cpp/lib"
main.o(.text+0x118d):main.cpp: undefined reference to `compAI(int*, int*, TicTacToe*)'
make.exe: *** [tictactoe-game.exe] Error 1
Execution terminated