Hello my code works almost 100% i cant figure out how to get my win function to work it finds the winner for x but not for o or no winner. Can anyone help?!
You have quite a few problems in your findWinner function:
Line 102: c is uninitialized. You need a second nested loop to check each column within the row.
Line 101: You need to zero count at the top of the loop for each row. You don't want two Xs in the first row and one in the second to trigger a win.
Line 104: You need to check count inside the outter loop before checking the next row.
Line 109: value of r is left over from the previous loop. Again, you need a second nested loop to check each row within the column.
Line 108: Same comment as 101 about zeroing count.
Line 113: Same comment as 104 about checking cout.
Lines 117-120: Doesn't work here. Remove.
Lines 121-123: You're only checking one diagonal.
Line 125: You're not returning false if all the checks for winning combinations fail.