#include <iostream>
using namespace std;
char * search_word(char * word,char * dict[],int n)
{int low=0,high=n-1,mid,searchpos,wordlen=strlen(word);
do
{
mid=(low+high)/2;
searchpos=strnicmp(word,dict[mid],wordlen);
if(searchpos==0)
return dict[mid];
else if(searchpos<0)
high=mid+1;
else
low=mid+1;
}
while(high>low);
return NULL;
}
手掌心
三国纷争
蝴蝶不菲