   about the LNK errors in visual c++
  Hey everyone,i got this error in visual c++ 2010 express editionerror LNK2019: unresolved external symbol "void __cdecl start(void)" (?start@@YAXXZ) referenced in function _mainerror LNK1120: 1 unresolved externalsiam pretty sure about the code, so can someone tell me what is the problem???One more thing, is Beginning Game Programming by Jonathan S. Harbourany good??and is it a lot different from Beginning C++ Through Game Programming, Second Edition by Mike Dawsonbecause iam nearly done with that one and i don't know where to go next because i was thinking either Johnathan Harbour's book or try to learn about OpenGLreally appreciate the help guys   
  It sounds like you're calling a function that is never defined. Are you forgetting to add a .cpp file to your project? Post your code.   ;  There you go, iam trying to create the basic concept of Tic-Tac-Toe for practicefeel free to post any tips to improve itthx#include<iostream>#include<vector>#include<cstdlib>#include<ctime>#include<algorithm>char x = 'X';char o = 'O';char T = 'T';char EMPTY = ' ';int max_size = 9;using namespace::std;void start();char firstturn();char enemypiece(char human);char win(const vector<char>& board, char turn);void displayboard(const vector<char>& board);void chose(vector<char>& board, char turn);void computerchose(vector<char>& board, char turn);bool islegalaction(const vector<char>& board, char choice, char turn);char changeturn(char turn);void winner(const vector<char>& board, char turn, char human, char enemy);int main(){start();vector<char> board(max_size, EMPTY);char human = firstturn();char enemy = enemypiece(human);char turn = x;while(win(board, turn) != x && win(board, turn) != o && win(board, turn) != T){displayboard(board);if(turn == human){chose(board, turn);}else{computerchose(board, turn);}turn = changeturn(turn);}winner(board, turn, human, enemy);return 0;}void displayboard(const vector<char>& board){cout << "\t\t" << board[0] << " | " << board[1] << " | " << board[2] << '\n';cout << "\t\t---------------------------------\n";cout << "\t\t" << board[3] << " | " << board[4] << " | " << board[5] << '\n';cout << "\t\t---------------------------------\n";cout << "\t\t" << board[6] << " | " << board[7] << " | " << board[8] << '\n';cout << "\n";}char firstturn(){char choice;do{cout << "Do you want to go first, Human?? (y/n)\n";cin >> choice;}while(choice != 'y' && choice !='n');if (choice == 'y')return x;elsereturn o;}char enemypiece(char human){if(human == x)return o;elsereturn x;}void chose(vector<char>& board, char turn){char choice;cout << "What is your move, human??? (0 -> 8) : ";do{cin >> choice;if(choice == 0 && islegalaction(board, choice, turn) == true)board[0] = turn;else if (choice == 1 && islegalaction(board, choice, turn) == true)board[1] = turn;else if (choice == 2 && islegalaction(board, choice, turn) == true)board[2] = turn;else if (choice == 3 && islegalaction(board, choice, turn) == true)board[3] = turn;else if (choice == 4 && islegalaction(board, choice, turn) == true)board[4] = turn;else if (choice == 5 && islegalaction(board, choice, turn) == true)board[5] = turn;else if (choice == 6 && islegalaction(board, choice, turn) == true)board[6] = turn;else if (choice == 7 && islegalaction(board, choice, turn) == true)board[7] = turn;else if (choice == 8 && islegalaction(board, choice, turn) == true)board[8] = turn;elsecout << "Please enter a valid number\n";}while(choice <= 0 || choice > 8);}void computerchose(vector<char>& board, char turn){srand(time(0));int random;bool truth = false;while(truth == false){random = rand() % 8;if(islegalaction(board, random, turn) == true){board[random] = turn;truth = true;}}}bool islegalaction(const vector<char>& board, char choice, char turn){bool truth = false;if(board[choice] == EMPTY)truth = true;return truth;}char changeturn(char turn){if(turn == x)return o;elsereturn x;}char win(const vector<char>& board, char turn){int winninggame[8][3]= { {0,1,2},{3,4,5},{6,7,8},{0,3,6},{1,4,7},{2,5,8},{0,4,8},{2,4,6}};for(int row = 0; row < 8; row++){if(board[winninggame[row][0]] == board[winninggame[row][1]] && board[winninggame[row][1]] == board[winninggame[row][2]] && board[winninggame[row][2]] != EMPTY)return turn;else if(board[winninggame[row][0]] == EMPTY)return EMPTY;elsereturn T;}}void winner(const vector<char>& board, char turn, char human, char enemy){if(win(board, turn) == turn && turn == human)cout << "\n\nTHE HUMAN WINES\nYou have been a formidable opponent, human. You have defeated me. I hope out paths will cross again soon.\n\n";else if (win(board, turn) == turn && turn == enemy)cout << "\n\nTHE ENEMY WINS\nA pitifull fool just as i imagined. Your race are no match for me\n";else if(win(board,turn) == T)cout << "\n\nTIE\nIt seems that we are equal in force, human\n";} [Edited by - ApochPiQ on May 26, 2010 5:26:06 PM];  First, you can place code inside [source][/source] to do this:#include<iostream>#include<vector>#include<cstdlib>#include<ctime>#include<algorithm>char x = 'X';char o = 'O';char T = 'T';char EMPTY = ' ';int max_size = 9;using namespace::std;// Here's your problem!!!!!void start();// << prototype declaration but no definition// You need to define this like the functions you did below.// **********************************************char firstturn();char enemypiece(char human);char win(const vector<char>& board, char turn);void displayboard(const vector<char>& board);void chose(vector<char>& board, char turn);void computerchose(vector<char>& board, char turn);bool islegalaction(const vector<char>& board, char choice, char turn);char changeturn(char turn);void winner(const vector<char>& board, char turn, char human, char enemy);int main(){start();vector<char> board(max_size, EMPTY);char human = firstturn();char enemy = enemypiece(human);char turn = x;while(win(board, turn) != x && win(board, turn) != o && win(board, turn) != T){displayboard(board);if(turn == human){chose(board, turn);}else{computerchose(board, turn);}turn = changeturn(turn);}winner(board, turn, human, enemy);return 0;}void displayboard(const vector<char>& board){cout << "\t\t" << board[0] << " | " << board[1] << " | " << board[2] << '\n';cout << "\t\t---------------------------------\n";cout << "\t\t" << board[3] << " | " << board[4] << " | " << board[5] << '\n';cout << "\t\t---------------------------------\n";cout << "\t\t" << board[6] << " | " << board[7] << " | " << board[8] << '\n';cout << "\n";}char firstturn(){char choice;do{cout << "Do you want to go first, Human?? (y/n)\n";cin >> choice;}while(choice != 'y' && choice !='n');if (choice == 'y')return x;elsereturn o;}char enemypiece(char human){if(human == x)return o;elsereturn x;}void chose(vector<char>& board, char turn){char choice;cout << "What is your move, human??? (0 -> 8) : ";do{cin >> choice;if(choice == 0 && islegalaction(board, choice, turn) == true)board[0] = turn;else if (choice == 1 && islegalaction(board, choice, turn) == true)board[1] = turn;else if (choice == 2 && islegalaction(board, choice, turn) == true)board[2] = turn;else if (choice == 3 && islegalaction(board, choice, turn) == true)board[3] = turn;else if (choice == 4 && islegalaction(board, choice, turn) == true)board[4] = turn;else if (choice == 5 && islegalaction(board, choice, turn) == true)board[5] = turn;else if (choice == 6 && islegalaction(board, choice, turn) == true)board[6] = turn;else if (choice == 7 && islegalaction(board, choice, turn) == true)board[7] = turn;else if (choice == 8 && islegalaction(board, choice, turn) == true)board[8] = turn;elsecout << "Please enter a valid number\n";}while(choice <= 0 || choice > 8);}void computerchose(vector<char>& board, char turn){srand(time(0));int random;bool truth = false;while(truth == false){random = rand() % 8;if(islegalaction(board, random, turn) == true){board[random] = turn;truth = true;}}}bool islegalaction(const vector<char>& board, char choice, char turn){bool truth = false;if(board[choice] == EMPTY)truth = true;return truth;}char changeturn(char turn){if(turn == x)return o;elsereturn x;}char win(const vector<char>& board, char turn){int winninggame[8][3]= { {0,1,2},{3,4,5},{6,7,8},{0,3,6},{1,4,7},{2,5,8},{0,4,8},{2,4,6}};for(int row = 0; row < 8; row++){if(board[winninggame[row][0]] == board[winninggame[row][1]] && board[winninggame[row][1]] == board[winninggame[row][2]] && board[winninggame[row][2]] != EMPTY)return turn;else if(board[winninggame[row][0]] == EMPTY)return EMPTY;elsereturn T;}}void winner(const vector<char>& board, char turn, char human, char enemy){if(win(board, turn) == turn && turn == human)cout << "\n\nTHE HUMAN WINES\nYou have been a formidable opponent, human. You have defeated me. I hope out paths will cross again soon.\n\n";else if (win(board, turn) == turn && turn == enemy)cout << "\n\nTHE ENEMY WINS\nA pitifull fool just as i imagined. Your race are no match for me\n";else if(win(board,turn) == T)cout << "\n\nTIE\nIt seems that we are equal in force, human\n";}Secondly, as i noted above, the only change you need to do is actually define the body of "start". You have a prototype declaration, but no definition body.   ;  You never implemented the start() function. What is it supposed to do?   ;  i made too much functions ad i forgot to implement that one.thx for the help guysanybody got any info for the books???   