    #include <iostream>
    #include <algorithm>
    
    int main()
    {
        char letters[] = "aabbccbccd";
     
        // this will point to the first character of the sequence that is to be
        // removed.
        char *ptrStart = std::remove(std::begin(letters), std::end(letters), 'b');
    
        *ptrStart = '\0';  // null terminate this
        std::cout << "The characters after erasing are: " << letters;
    }

