Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Halfmaster1

macrumors newbie
Original poster
Dec 28, 2010
19
0
I'm setting up code for a prime number generator.

Now, I have all the code fine, but I'm getting a weird error.


Code:
#include <stdio.h>
#include <stdbool.h>

bool IsItPrime(int testPrime)

int main (int argc, const char * argv[])
{ //Expected '=', ',', 'asm' or '_attribute_' before '{' token

//More code, calling of the IsItPrime function, declaration of testPrime
	
return 0
	
} //Expected '{' at end of input




bool IsItPrime(int testPrime)
{ //Expected '=', ',', 'asm' or '_attribute_' before '{' token

//some code, with a while loop and an if statement. Declaration of a few variables only used in this.

} //Expected '{' at end of input

A few comments are errors, I think you can tell which ones.

So, I have no idea how to fix this.

Any ideas?
Thanks.
 
4th line:
Code:
bool IsItPrime(int testPrime)[SIZE="5"][b];[/b][/SIZE]
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.