I am working on a console Tic Tac Toe game and I found this weird bug I can't seem to find a solution to. When you enter numbers in any order the board cahnges as it should do, but when you enter the combination 1,2,4. 1 = 'X' which it should but the next two are 'O' and I can't find out why, hope one of you sees the error :D.
Comment:
-I know I should't use system("cls");
-winPos isn't used yet.
It specifies that turn is a reference to an int - the effect is similar to passing a pointer to an int, but the mechanism is not quite the same. This describes it better than I can: