#
Write a function named deleteS that accepts one character pointer as a parameter and returns no value. The parameter is a C string. This function must remove all of the upper and lower case 's' letters from the string. The resulting string must be a valid C string.
Your function must declare no more than one local variable in addition to the parameter; that additional variable must be of a pointer type. Your function may not use any square brackets.
int main()
{
char msg[50] = "She'll be a massless princess.";
deleteS(msg);
cout << msg; // prints he'll be a male prince.
}
Can anyone give me some hints on this? Thx
this is how my function gonna look like.. I think...
void deleteS(const char* str, char alpha)
and alpha is gonna be S or s
Write a function named deleteS that accepts one character pointer as a parameter and returns no value. The parameter is a C string. This function must remove all of the upper and lower case 's' letters from the string. The resulting string must be a valid C string.
Your function must declare no more than one local variable in addition to the parameter; that additional variable must be of a pointer type. Your function may not use any square brackets.
int main()
{
char msg[50] = "She'll be a massless princess.";
deleteS(msg);
cout << msg; // prints he'll be a male prince.
}
Can anyone give me some hints on this? Thx
this is how my function gonna look like.. I think...
void deleteS(const char* str, char alpha)
and alpha is gonna be S or s
Comment