#include <algorithm>
#include <iostream>
bool is_bad (const char &c) { return c == 'a'; }
int main (int argc, char *argv[]) {
char test1[] = "123a45";
std::cout << test1 << std::endl;
char * new_end = std::remove_if(test1, test1 + sizeof(test1), is_bad);
*new_end = '\0';
std::cout << test1 << std::endl;
return 0;
}
I2luY2x1ZGUgPGFsZ29yaXRobT4KI2luY2x1ZGUgPGlvc3RyZWFtPgoKYm9vbCBpc19iYWQgKGNvbnN0IGNoYXIgJmMpIHsgcmV0dXJuIGMgPT0gJ2EnOyB9CgppbnQgbWFpbiAoaW50IGFyZ2MsIGNoYXIgKmFyZ3ZbXSkgewogIGNoYXIgdGVzdDFbXSA9ICIxMjNhNDUiOwogIHN0ZDo6Y291dCA8PCB0ZXN0MSA8PCBzdGQ6OmVuZGw7CiAgY2hhciAqIG5ld19lbmQgPSBzdGQ6OnJlbW92ZV9pZih0ZXN0MSwgdGVzdDEgKyBzaXplb2YodGVzdDEpLCBpc19iYWQpOwogICpuZXdfZW5kID0gJ1wwJzsKICBzdGQ6OmNvdXQgPDwgdGVzdDEgPDwgc3RkOjplbmRsOwoKICByZXR1cm4gMDsKfQo=