You can use std::copy
, from the algorithm
header:
std::copy(hw.begin(), hw.end(), r_record + 10);
If you want to use a vector instead of the dynamically allocated array (a good idea), then
std::vector<unsigned char> r_record(1024); // 1024 zero initialized elements
std::copy(hw.begin(), hw.end(), r_record.begin() + 10);