Convert vector<unsigned char> {1,2,3} into string “1-2-3” AS DIGITS
问题 I want to display numbers in a std::vector<unsigned char> on a screen, but on its way to the recipient, I need to stuff these numbers into a std::string . Whatever I tried ( atoi , reinterpret_cast , string.c_str() ...), gave me either a nonsense, or a letter representation of those original numbers - i.e. their corresponding ascii characters. So how do I easily (preferably standard method) convert vector<unsigned char> {1,2,3} into a string "1-2-3" ? In the Original Post (later edited) I