The problem with this is that when you get input like "(Bob)", then it saves " Bob ", rather than the preferred "Bob" with no spaces attached. Any help is much appreciated!
It seems you are attempting to remove any punctuation from an std::basic_string object. I'm only able to think of two options. You can choose to erase a character from the object using the std::basic_string::erase() member function. Or you could choose to append the new lowercase character to another std::basic_string object.