70,006
社区成员




struct key
{
char *word;
int data;
} Key[]=
{
"a",10,
"b",11,
"c",8,
"d",8,
"f",8,
"g",8,
"h",8,
"i",8,
"j",8
};
int binsearch(char *word,struct key k[],int n)
{
int count;
int low,hight,mid;
low=0;
hight=n-1;
int i=0;
for(i=0;i<8;i++)
{
printf("%c\r\n",*(k++)->word);//为什么这里不可以用printf("%s\r\n
}
return 0;
//....
*(k++)->word
int binsearch(char *word,struct key k[],int n)
{
int count;
int low,hight,mid;
low=0;
hight=n-1;
int i=0;
for(i=0;i<8;i++)
{
printf("%c\r\n",*(k++)->word);//为什么这里不可以用printf("%s\r\n
}
return 0;
//....
for(i=0;i<8;i++)
{
printf("%s\n", Key[i].word);//lz为何不用i
}
for(i=0;i<8;i++)
{
printf("%s\n", Key[i].word);//lz为何不用i
}