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.
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.
Code://For std::string std::copy(str.begin()+4,str.end(),copytoItr); //for c-string std::copy(str+4,str+STR_LEN,copytoItr);
It is too clear and so it is hard to see.
A dunce once searched for fire with a lighted lantern.
Had he known what fire was,
He could have cooked his rice much sooner.
Code:std::string oldstring("Hey there!"); std::string newstring(oldstring.substr(4)); // newstring = "there!"
"Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
-Christopher Hitchens