// string::assign #include <iostream> #include <string> int main () { std::string str; std::string other="The quick brown fox jumps over a lazy dog."; str.assign(other); std::cout << str; return 0; }