解读代码
部分代码如下(编译器为vc++6.0)char *string1,*string2;
char *p,*q;
int locat[10];
int j,len2,i=0,posit=0;
printf("Please input string1:\n");
gets(string1);
printf("Please input string2:\n");
gets(string2);
q=string2;
for(j=0;*q!='\0';j++,q++)
len2=j+1;
p=string1;
q=string2;
compile时提示
warning C4700: local variable 'string1' used without having been initialized
warning C4700: local variable 'string2' used without having been initialized
调试是出错,请问这是why?