摘要: 核心是模式串next数组的生成#include <stdio.h>#include <string.h>#define NS 100int strpos( char s1[] , char s2[] ,int N[]);void next( char s2[],int N[]);int main(int argc, char *args[] ){ int i = 0,k = 0; int N[NS] = {0}; next( args[2],N ); printf("%d\n",strpos(args[1],args[2],N)); return 0 阅读全文
posted @ 2011-04-08 21:35 一缕青烟 阅读(215) 评论(0) 推荐(0) 编辑