I want to copy a string without the first four characters. It doesn't matter weather or not it's c or c++ style strings.
Printable View
I want to copy a string without the first four characters. It doesn't matter weather or not it's c or c++ style strings.
Start copying at foo[4].
Code://For std::string
std::copy(str.begin()+4,str.end(),copytoItr);
//for c-string
std::copy(str+4,str+STR_LEN,copytoItr);
Code:std::string oldstring("Hey there!");
std::string newstring(oldstring.substr(4)); // newstring = "there!"