What is wrong with my if-else statement?

Apr 21, 2017 at 2:40am
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 Apr 21, 2017 at 2:40am
Apr 21, 2017 at 2:49am
Hi, remove the semicolon on line 6 :+)
Apr 21, 2017 at 2:56am
wow thanks
Topic archived. No new replies allowed.