Hi,
I am trying to create a method that accepts a pointer to a (static) string so that it can modify the string. I have something similar to this:
void modifyString(char **pstr) {
char *str = *pstr;
// Make changes to str ...
}
void doSomething() {
char str[] = "Hello World";
modifyString(&str);
}
If I compile the above code, I get the following message:
warning: passing arg 1 of 'modifyString' from incompatible pointer type
How can I write a method which will allow me to modify the contents of a static string?