Avatar of sudarshantk
sudarshantk
Flag for India

asked on 

C Strstr() Question

char buff1[50];
char buff[]="abcdefghijklmnopqrstuvwxyz";
char *searchString="abcdefghijklmnopqrstuvwxyz";
char findstring[]="0";
......
for(j=0; j < 26; j++)
{
      *findstring = *(searchString+j);      
......
      strcpy(buff1, strstr(buff, findstring));  //O.k
......
      len=strlen(strstr(buff1+1, findstring));  //Crashing Here
......
}
Could you please correct the above code.
C++CVisual C++.NET

Avatar of undefined
Last Comment
Infinity08

8/22/2022 - Mon