Compile error

Why wont this function compile? I think its saying I need a "{" or a ";".
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  bool together (ER & e, int x, int y)
{
	bool inX = false;
	bool inY = false;
	for(int i = 0; i < arrSize; i++)
	{
		if(e[i] == x)
		{
			inX = true;
		}
		else if(e[i] == y)
		{
			inY = true;
		}
		else(inX && inY)
		{
			return(inX && inY);
		}
	}
}
Last edited on
An else statement doesn't have a condition clause "()".

Topic archived. No new replies allowed.