If I had a buffer like:
uint8_t buffer[32];
and it was filled up completely with values, how could I get it into a stringstream, in hexadec
#include #include std::stringstream ss; ss << std::hex << std::setfill('0'); for (int i = 0; i < 32; ++i) { ss << std::setw(2) << static_cast(buffer[i]); }