#include #include #include std::string ReturnString(void) { std::string x("shrek"); return x; // the return makes a copy } int main(int argc, char **argv) { std::string a("bleg"); std::string b(a); // copies a to b // Copy return value into b. b = ReturnString(); return EXIT_SUCCESS; }