I have a simple question. Let's say I want to change all the spaces in a given string with a '+' character. I have to do this with pointers.
Code:
void change(char *ps){
while((*ps++)!='\0'){
if(*ps==' '){
*ps='+'; // this seems to be wrong ...But how do I change the
//value that the pointer is pointing to??
}
}
}