strcat takes two strings, it does not work on a string and a char.
So strcat(str,"A"); is valid, but strcat(str,'A'); is not, because 'A' is a single char not a string.
This is why you get the error.
A better solution is to use two index variables, one that indexes the current character in pid, and one that indexes the current character in neww.
If the character is one you want, copy it and increment both indices (indices=plural of index).
If the character is not one you want, just increment the index into pid.
Don't forget to add a null terminator when you're done.