I am trying to make a function that takes a string and removes all occurences of a specified character then returns the new string. The code I wrote generates an error, and I am having no luck debugging the problem. Can someone point me in the write direction? I am using visual studio 2003.
char* remove(char *str, char c)
while(*str != '\0')
char* str = "This is a test";
char c= ' ';
// cout<<endl<<remove(str, c);