char* newstr(char * str){
if(str == NULL)
return NULL;
int blank = ;
int len = strlen(str);
int i = ;
for(i = ; i < len ; i++)
if(str[i] == ' ')
blank++;
int j = ;
char * newhead = new char[len + blank* +];
for(i = ; i < len; i++){
if(str[i] != ' ')
newhead[j++] = str[i];
else{
newhead[j++] = '%';
newhead[j++] = '';
newhead[j++] = '';
}
}
newhead[j] = '\0';
str = newhead;
return str;
}