#include <iostream>
#include <string>
int main() {
std::string x("foo\0bar", 7);
for (std::string::iterator i = x.begin(); i != x.end(); ++i) {
std::cout << std::hex << static_cast<int>(*i) << std::endl;
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgoKaW50IG1haW4oKSB7CiAgICBzdGQ6OnN0cmluZyB4KCJmb29cMGJhciIsIDcpOwogICAgCiAgICBmb3IgKHN0ZDo6c3RyaW5nOjppdGVyYXRvciBpID0geC5iZWdpbigpOyBpICE9IHguZW5kKCk7ICsraSkgewogICAgICAgIHN0ZDo6Y291dCA8PCBzdGQ6OmhleCA8PCBzdGF0aWNfY2FzdDxpbnQ+KCppKSA8PCBzdGQ6OmVuZGw7CiAgICB9Cn0=