One of the std::string::erase() overloads takes two integers (a,b), b being a default parameter. When b is omitted, std::string::erase() removes all elements from a to the end of the string.
To remove only one element, either pass 1 as the second parameter, or use one of the overloads that take iterators.