dear all,
I have a problem at the following code that causes a segmentation fault and don't know the reason:
char * cString (char letter, char * string)
{
char *first= string;
char *point= string;
while(*string!='\0')
{
if (*string!=letter)
{
*point=*string; //segmentation error
point++;
}
string++;
}
return first;
}
I appreciate any help concerning this problem
Thanks a lot,