正在加载图片...
int index(string s, string t, int pos)i f(pos>0)i n=strlen (s)m=strlen pos, while (i<n-m+1 substr (sub, S, l, m) f (strcmp (sub, t)!=0)++i else return(i); return(0)int index(string s,string t,int pos){ if(pos>0){ n=strlen(s);m=strlen(t);i=pos; while (i<n-m+1){ substr(sub,s,i,m); if (strcmp(sub,t)!=0) ++i; else return(i);} } return(0); }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有