这样写应该比较好看了
//这样写应该比较好看了,程序是经过测试的,0就是结束符
char * temp = "Front%20matter%20front.htm";;
char new[256];
//用来存放处理后的字符串
int i=0;
int j=0;
while(*(temp + i) != 0)
{
if(*(temp + i) != '%')
{
*(new + j) = *(temp + i);
}else{
*(new + j) = ' ';
i +=2;
}
i++;
j++;
}
*(new +j) = 0;
printf("new character = %s\n", new);
return 1;