因此,我在第83:9行或斜杠所在的位置出现括号问题。它告诉我“错误:预期标识符或'{'令牌前的'(',”,我不明白我是如何收到此错误的。如果有人可以向我解释我如何收到此错误,谢谢。
不多
_Bool palindromes(char string[])
{
int i = 0;
while(string[i]=0 != '\0')
{
i++;
int last_place = i - 1;
for(int n=0; n<=last_place; n++)
{
if(string[n] == string[last_place])
{
last_place--;
continue;
}
if(n !=last_place)
{
return false;
}
}
}
}
{ //here is the bracket it's detecting
int i = 0;
while(string[i]=0 != '\0')
{
i++;
int last_place = i - 1;
for(int n=0; n<=last_place; n++)
{
if(string[n] == string[last_place])
{
return true;
}
}
}
}
答案 0 :(得分:1)
如果您修改了自己的标识
_Bool palindromes(char string[])
{
int i = 0;
while(string[i]=0 != '\0')
{
i++;
int last_place = i - 1;
for(int n=0; n<=last_place; n++)
{
if(string[n] == string[last_place])
{
last_place--;
continue;
}
if(n !=last_place)
{
return false;
}
}
}
} <---------- ups, function ends here
{ //here is the bracket it's detecting
int i = 0;
while(string[i]=0 != '\0')
这清楚地表明您有太多}