there are some subtleties involved here, so this might not work in all cases (dig into the specification of std::string if you want to know more).

actually, a null-terminated std::vector<char> would probably be a cleaner solution, but that's really just if you're feeling very pedantic today