#include <iostream>
class base
{
public:
base(const char * name) {name_ = name;}
const char * getName() {return name_;};
private:
const char * name_;
};
class derived : public base
{
public:
derived(const char * name) : base(name) {}
};
int main(int argc, char **argv)
{
derived d("test");
std::cout << d.getName() << std::endl;
}
CiNpbmNsdWRlIDxpb3N0cmVhbT4KCmNsYXNzIGJhc2UKewogICBwdWJsaWM6CiAgICAgYmFzZShjb25zdCBjaGFyICogbmFtZSkge25hbWVfID0gbmFtZTt9CiAgICAgY29uc3QgY2hhciAqIGdldE5hbWUoKSB7cmV0dXJuIG5hbWVfO307CiAgIHByaXZhdGU6CiAgICAgY29uc3QgY2hhciAqIG5hbWVfOwp9OwpjbGFzcyBkZXJpdmVkIDogcHVibGljIGJhc2UKewogICBwdWJsaWM6CiAgICAgZGVyaXZlZChjb25zdCBjaGFyICogbmFtZSkgOiBiYXNlKG5hbWUpIHt9Cn07CgppbnQgbWFpbihpbnQgYXJnYywgY2hhciAqKmFyZ3YpCnsKICAgIGRlcml2ZWQgZCgidGVzdCIpOwogICAgc3RkOjpjb3V0IDw8IGQuZ2V0TmFtZSgpIDw8IHN0ZDo6ZW5kbDsKfQ==