What is wrong with my if-else statement?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
if (win1 == true)
		{
			cout << "Player x won" << endl;
			xWin++;
		}
		else if (win2 == true);
		{
			cout<< "Player o won" <<endl;
			oWin++;
		}
		else//error expected a statement
		{
			cout << " Draw" << endl; 
		}
Last edited on
Hi, remove the semicolon on line 6 :+)
wow thanks
Topic archived. No new replies allowed.