int compare(const char * str1,const char * str2 ){ int t = 0 ;while( ! (t = *(unsigned char *)str1 - *(unsigned char *)str2) && *str2)//就是这一行str1++, str2++;if ( t < 0 ) t = -1 ;else if ( t > 0 ) t = 1 ;return( t ); }
添加回答
举报
0/150
提交
取消