View Single Post
  #1   Spotlight this post!  
Unread 20-01-2007, 13:12
fallen751 fallen751 is offline
Registered User
FRC #2052
 
Join Date: Jan 2007
Location: Minnesota
Posts: 17
fallen751 is an unknown quantity at this point
hey, stupid question but...

I was wondering if anyone could give me any help. I keep coming up with an error when I try to use this function definition. I haven't declared the function in anywhere else other then this, and it is ahead of any calls to the function so I let it be its own prototype.

Code:
int intMax(int x, int y)
{                                //here is where I get the syntax error
	int max = x;
	if(y > max)
	{
   		max = y;
	}
   return max;
}
would I have to use it as an inline function? any help would be great!