嗨,你能帮我处理我的代码吗:
typedef struct term{
char var[10];
int val[8];
}TERM;
TERM termx[50];
int initialize();
int a[15],b[15],c[15];
int check(TERM termx[].var[],int i){
int j;
const char* const StringArray[NrOfStrings] =
{
"ABC","ABC'","AB'C'","A'B'C'","A'B'C","A'BC'","AB'C",
"AB+C","A'B'+C'","A'B'+C","A'B+C'","AB'+C'","AB'+C","
"A+BC","A'+B'C'","A'+B'C","A'+BC'","A+B'C'","A+B'C",
};
for(j=0;j<NrOfStrings;j++){
if(stcmp(term[i].var,StringArray[j])==0){
return(j);
break;
}
}
}
void main(){
int x,i,j,key;
char y[10];
initialize();
clrscr();
printf("Enter the number of terms: ");
scanf("%d",&x);
for(i=0;i<x;i++){
printf("Enter the %d term: ",i+1);
scanf("%s",termx[i].var);
for(j=0;j<strlen(termx[i].var);j++)
termx[i].var[j]=changeToupper(termx[i].var[j],i,j);
key=check(termx[i].var,i);
}
printf("\nA\tB\tC\n\n");
for(i=0;i<8;i++)
printf("%d\t%d\t%d\n",a[i],b[i],c[i]);
getch();
}
它给了我预期的“)”错误及其指向函数check()的参数。我知道这是一个常见错误,但我尝试搜索谷歌但找不到解决方案。我希望你能帮助我。谢谢