因此,从档案中看一看一看。
char temp[3];
temp[0] = nextchar;
printf("%c",temp[0]); //prints %
temp[1] = nextchar = fgetc(srcptr);
printf("%c",temp[1]); //prints 2
temp[2] = nextchar = fgetc(srcptr);
printf("%c",temp[2]); //prints 0
if(strcmp(temp, "%20") == 0) { printf("%s","blahblah"); }
理想的情况是,这应该最终印刷“blahblah”。 然而,它没有。 因此,为什么会恢复0,更重要的是:,我可以确定它?