I'm having a hard time completing my tik tak toe game. I'm stuck at the horizontal check as you can see below. I don't know why it won't declare the winner even though I have the command to declare it at the bottom.
I know this is just basic, but I really can't see my problem.
A quick help would be gladly appreciated.
PS.: Sorry for the messy code. I've done a lots of trial and error so that's what caused it.
The problem in your program is hard to spot without identation. This is a good example of why you want to stay away from sloppy looking code. On line 102 you end the else if that starts on line 47. It might be a little hard to spot this because everything is not indented properly. In the future you might want to save yourself the trouble and just keep your code indented at all times. To fix the error just end the else if before you check for wins. I think that should do it.
I recommend Notepad++ if you are using windows. It has a menu command that can automatically redo indenting for c++. (That is how I spotted the error.)