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
you could write a little function
string int_array_to_string(int int_array[], int size_of_array) {
string returnstring = "";
for (int temp = 0; temp < size_of_array; temp++)
returnstring += itoa(int_array[temp]);
return returnstring;
}
untested!
a slightly different approach
string int_array_to_string(int int_array[], int size_of_array) {
ostringstream oss("");
for (int temp = 0; temp < size_of_array; temp++)
oss << int_array[temp];
return oss.str();
}