ahhh kk finally got it, thanks every1! :)
Type: Posts; User: coffee_cup
ahhh kk finally got it, thanks every1! :)
but why isn't the \0 at the right position already? my while loop reads until a \0 is found. with *str = *ptr; why wouldn't \0 be covered too?
thanks in advance!
thanks once again!
ok two changes:
1) added && (*ptr != '\0') to inner while loop to prevent incrementation on \0
2) added *str = '\0'; as proposed
void removeSign(char *str)
{
Ah thanks will look into that brb ^^
Thanks alot for the suggestion, I did not know of "isalpha", handy :)
It didn't do the trick though, the issue remains the same =/
As said I also don't get why whitespace function would work...
Hey!
Could you by any chance give me some hints why the following function does not work the way it should?
void removeSign(char *str)
{
char *ptr = str;
while (*ptr != '\0') {
...