close
int b,k,m;
String name;
boolean found;
found=false;
name=Edit1->Text;
b=1;
k=N;
while((b<=k) & !found)
{
m=(int)((b+k)/2);
if(name.AnsiCompareIC(a[m][0])==0)
{
Label3->Caption=a[m][1];
found=ture;
break;
}
else
if(name.AnsiCompareIC(a[m][0])>0)
b=m+1;
else
k=m-1;
}
if(found==false)
Label3->Caption="查無此字";
arrow
arrow
    全站熱搜

    CrescentMoon 發表在 痞客邦 留言(7) 人氣()