To copy from a to b, take std::copy(src_start,src_end,dest_start) , which increments src_start and copies it to the next destination element until src_start==src_end is executed.
memcpy(oldname,name,strlen(name)+1)
.. except that it will also work for non-POD, and you do not need to bind to bytes if one element has more than one byte.
However, if you just want to perform string manipulations, std::string (and std::wstring for wide char) strings are provided. Concatenating them is as simple as:
std::string s = "name",s2 = ..,s3 = ..; s = s2+s+s3+"Hello";
Nothing prevents you from using the strxxx family of functions in C ++, but I highly recommend that you switch to std::string and the rest of STL. It is not perfect, but much less error prone.
Alexander Gessler
source share