int main ()
{
char *s=”123abc123abc123abc123abc123abc”;
char* p;
p = strstr(s, “abc”);
}
strstr匹配字符串中目标字符串第一次出现的地方
int main ()
{
char *s=”123abc123abc123abc123abc123abc”;
int n = 0;
do
{
p = strstr(p , “abc”);
if(p != NULL)
{
n++;
p = p+strlen(“abc”);
}
}
char* p;
p = strstr(s, “abc”);
}