After a loong hitaeus from C++, due to other obligations, I decided to 'finish' my TicTacToe game; come to realize it was a complete mess I started again. I'll post the main function, that's what I belive to be causing the problem..
And here are the errors:Code:int main () { init(); table(); while (1) { if (moves <= 9) { if (checkWin(playerup) != 0 || checkWin(playerup) != 1) { getInput(playerup); setInput(playerup); SYSTEM("CLS"); playerup = 'o'; } else { if (playerup == 'x') { cout << playername1 << " wins! Congratulations."; table(); return 0; } else { cout << playername2 << "wins! Congratulations."; table(); return 0; } } } else { cout << "No winner this time; thanks for playing!"; table(); return 0; } } }
The first error points to the line where I initialize main, I can't figure out what I did wrong; although its probably something stupid. I assume the second error is derived from the first so that's not a worry..
C:\My Documents\TicTacToe2\tictactoe.cpp(19) : error C2448: '<Unknown>' : function-style initializer appears to be a function definition
C:\My Documents\TicTacToe2\tictactoe.cpp(19) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
tictactoe.obj - 2 error(s), 0 warning(s)



LinkBack URL
About LinkBacks


