#include<stdio.h>
#include<string.h>
#include<stdlib.h>
struct boom{
int x;
char y[10];
};
void B(boom &T);
void main()
{
boom T[10];
for(int i=0;i<10;i++){
scanf("%d %s",&T[i].x,T[i].y);
printf("%d %s\n",T[i].x,T[i].y);
}
B(T[10]);
}
void B(boom &T){
boom T1;
scanf("%d %s",&T1.x,T1.y);
for(int i=0;i<10;i++){
if(strcmp(T[i].y,T1.y)==0){
printf("hhhhh\n");
exit(0);
}
}
}
C:\Documents and Settings\Administrator\桌面\Text1.cpp(26) : error C2676: binary '[' : 'struct boom' does not define this operator or a conversion to a type acceptable to the predefined operator
C:\Documents and Settings\Administrator\桌面\Text1.cpp(26) : error C2228: left of '.y' must have class/struct/union type
Error executing xicl6.exe.
隔江千里
慕沐林林