#include <iostream>
#include <memory>
using namespace std;
class Variable
{
public:
const int x;
Variable(const int x) : x(x) {};
};
void create_variable(std::shared_ptr<Variable> &v)
{
v = std::make_shared<Variable>(5);
}
int main() {
std::shared_ptr<Variable> v;
create_variable(v);
std::cout << v->x << "\n";
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWVtb3J5Pgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY2xhc3MgVmFyaWFibGUKewpwdWJsaWM6Cgljb25zdCBpbnQgeDsKCVZhcmlhYmxlKGNvbnN0IGludCB4KSA6IHgoeCkge307Cn07Cgp2b2lkIGNyZWF0ZV92YXJpYWJsZShzdGQ6OnNoYXJlZF9wdHI8VmFyaWFibGU+ICZ2KQp7Cgl2ID0gc3RkOjptYWtlX3NoYXJlZDxWYXJpYWJsZT4oNSk7Cn0KCmludCBtYWluKCkgewoJc3RkOjpzaGFyZWRfcHRyPFZhcmlhYmxlPiB2OwoJY3JlYXRlX3ZhcmlhYmxlKHYpOwoJc3RkOjpjb3V0IDw8IHYtPnggPDwgIlxuIjsKCXJldHVybiAwOwp9