#include <iostream>
#include <string>
struct Entity
{
std::string name;
int age;
void update_data(Entity& rhs)
{
name = rhs.name;
age = rhs.age;
}
};
struct Human: Entity
{
};
struct People: Entity
{
};
int main()
{
Human h;
h.name = "Max";
h.age = 24;
People p;
p.update_data(h);
std::cout << p.name;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgoKc3RydWN0IEVudGl0eQp7CiAgICBzdGQ6OnN0cmluZyBuYW1lOwogICAgaW50IGFnZTsKICAgIHZvaWQgdXBkYXRlX2RhdGEoRW50aXR5JiByaHMpCiAgICB7CiAgICAgICAgbmFtZSA9IHJocy5uYW1lOwogICAgICAgIGFnZSA9IHJocy5hZ2U7CiAgICB9Cn07CgpzdHJ1Y3QgSHVtYW46IEVudGl0eQp7Cn07CgpzdHJ1Y3QgUGVvcGxlOiBFbnRpdHkKewp9OwoKaW50IG1haW4oKQp7CiAgICBIdW1hbiBoOwogICAgaC5uYW1lID0gIk1heCI7CiAgICBoLmFnZSA9IDI0OwoKICAgIFBlb3BsZSBwOwogICAgcC51cGRhdGVfZGF0YShoKTsKICAgIHN0ZDo6Y291dCA8PCBwLm5hbWU7Cn0=