#include <iostream>
using namespace std;
int main() {
std::string x("Hello");
std::string y = x; // x and y use the same buffer
y += ", World!"; // now y uses a different buffer
// x still uses the same old buffer
cout << x + "\n";
cout << y;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglzdGQ6OnN0cmluZyB4KCJIZWxsbyIpOwoKCXN0ZDo6c3RyaW5nIHkgPSB4OyAgLy8geCBhbmQgeSB1c2UgdGhlIHNhbWUgYnVmZmVyCgoJeSArPSAiLCBXb3JsZCEiOyAgICAvLyBub3cgeSB1c2VzIGEgZGlmZmVyZW50IGJ1ZmZlcgogICAgICAgICAgICAgICAgICAgIC8vIHggc3RpbGwgdXNlcyB0aGUgc2FtZSBvbGQgYnVmZmVyCiAgICBjb3V0IDw8IHggKyAiXG4iOwogICAgY291dCA8PCB5OwoJcmV0dXJuIDA7Cn0=