2011年2月23日
摘要: #include<stdio.h>#include<stdlib.h>#include<string.h>/*naive string-matching algorithm,T为原始字符串,P为需要匹配的字符串*/void naiveMatch(char *T,char *P){ int lenT,lenP,i,j; lenT=strlen(T); lenP=strlen(P); if(lenT<lenP)/*需要匹配的字符串比原始字符串还要长出错*/ { perror("input error"); return ; } for( 阅读全文
posted @ 2011-02-23 16:43 tankzhouqiang 阅读(2212) 评论(4) 推荐(0) 编辑