For a simple Tic-Tac-Toe game I created a function C_choose(char pin[]) to choose the moves of the computer and verify the move hasn't yet been made.
The call, parameters, prototype and usage is exactly the same as P_choose which lets the user choose his moves. And yet there is a "undefined reference" error (exact error at the end). The error stops if line 59 is commented out.
The rest of the program seems to work as expected.
Any help would be appreciated.
Thanks in advance.
Edit: Forgot to mention. I use a 11 char array called pin to store the game. Pin[1] through Pin[9] store the actual game, while Pin[0] stores the computer's sign (X or O) and Pin[10] stores the player's.
owner@NetBook-Ubuntu:~/c++_code$ g++ -pedantic -Wall -o TicTacToe{,_main.cpp,_rest.cpp}
/tmp/ccIx811o.o: In function `main':
TicTacToe_main.cpp:(.text+0x111): undefined reference to `C_choose(char*)'
collect2: ld returned 1 exit status