Addition of C++ remove characters function