c语言 error C2143: syntax error

来源:百度知道 编辑:UC知道 时间:2024/05/17 17:35:52
不知道怎么错了,麻烦大家纠正。
isLink_Road 里 if那行错了,vc6.0我用的
E:\HunterViewProject\HunterView.c(76) : error C2143: syntax error : missing ')' before ';'
E:\HunterViewProject\HunterView.c(76) : error C2059: syntax error : ')'

struct hunterView
{
int playerHP[HUNTER];
int bloodPoint;

int currentTurn;
int currentRound;
int score;

int map[71][71];

char playerLocation[PLACE][TURN][ROUND];
char trail[PLACE][TRAIL];
playerMessage message[ROUND];

};

static int isLink_Road(HunterView hv,char *to, char *from)
{
int result=FALSE;
int Hto=hashing(to);
int Hfrom=hashing(from);

if(hv->map[Hto][Hfrom] == ROAD)
{
result=TRUE;
}

return result
}

static int isLink_Road(HunterView hv,char *to, char *from)
{
int result=FALSE;
int Hto=hashing(to);
int Hfrom=hashing(from);

if(hv->map[Hto][Hfrom] == ROAD)
{
result=TRUE;
}

return result; //这里要加分号
}

这类错误必须要看完整的源程序,错误不一定出现在提示行的