I have a string defined as std::string header = \"00110033\"; now I need the string to hold the byte values of the digits as if its constructed like this
std::string header = \"00110033\";
You can do this:
std::string header( data_bytes, data_bytes + sizeof( data_bytes ) ); std::transform( header.begin(), header.end(), header.begin(), std::bind1st( std::plus< char >(), '0' ) );