Void Function Problem

I am working on a program and I can't get one of my void functions to work. When I try to run my program it says that a ";" is expected instead of a "{"
please help.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//The functions prototype
void passOrFail(double*, int, int &, int &);

//The Function
void passOrFail(double *scores, int numScores, int& pass, int& fail)
	{
//It is ^ this bracket that gets the error message.
		for(scores[counter] >= 0; counter < numScores; counter++){
			if(scores[counter] >= 60){
				pass++;
			}
			else{
				fail++;
			}
	}


The purpose of the program is to accept a number of test scores via an array and this function is to determine the number of passing and failing scores.

I have not actually been able to test the function itself because of this one error so if the function needs work, advice would be greatly appreciated.

Thanks!
Your braces are unbalances: you have more opening braces than closing
Last edited on
Topic archived. No new replies allowed.