#include <iostream>
using namespace std;
namespace MyCode {
class Class1 {
public:
void mfunction1(int a) {}
};
class Class2 {};
void function1(int a) {}
}
namespace HisCode {
class Class3 {
public:
void mfunction2(int b) {}
void mfunction1(int a) {}
};
class Class4 {};
void function2(int b) {}
}
class OurNewClass : public MyCode::Class1, public HisCode::Class3 {
public:
using MyCode::Class1::mfunction1; // needed for disambiguation
void function3() {};
};
int main () {
using MyCode::function1;
OurNewClass thing;
function1(2);
thing.function3();
thing.mfunction1(10);
thing.mfunction2(20);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKbmFtZXNwYWNlIE15Q29kZSB7CiAgIGNsYXNzIENsYXNzMSB7CiAgIHB1YmxpYzogCiAgICAgICB2b2lkIG1mdW5jdGlvbjEoaW50IGEpIHt9CiAgIH07IAogICBjbGFzcyBDbGFzczIge307CiAgIHZvaWQgZnVuY3Rpb24xKGludCBhKSB7fQp9Cm5hbWVzcGFjZSBIaXNDb2RlIHsKICAgIGNsYXNzIENsYXNzMyB7IAogICAgcHVibGljOiAKICAgICAgICB2b2lkIG1mdW5jdGlvbjIoaW50IGIpIHt9ICAKICAgICAgICB2b2lkIG1mdW5jdGlvbjEoaW50IGEpIHt9CiAgICB9OwogICAgY2xhc3MgQ2xhc3M0IHt9OwogICAgdm9pZCBmdW5jdGlvbjIoaW50IGIpIHt9Cn0KCmNsYXNzIE91ck5ld0NsYXNzIDogcHVibGljIE15Q29kZTo6Q2xhc3MxLCBwdWJsaWMgSGlzQ29kZTo6Q2xhc3MzIHsKcHVibGljOgogICAgdXNpbmcgTXlDb2RlOjpDbGFzczE6Om1mdW5jdGlvbjE7ICAvLyBuZWVkZWQgZm9yIGRpc2FtYmlndWF0aW9uCiAgICB2b2lkIGZ1bmN0aW9uMygpIHt9Owp9OwoKaW50IG1haW4gKCkgewogICAgdXNpbmcgTXlDb2RlOjpmdW5jdGlvbjE7IAogICAgT3VyTmV3Q2xhc3MgdGhpbmc7CiAgICBmdW5jdGlvbjEoMik7IAogICAgdGhpbmcuZnVuY3Rpb24zKCk7CiAgICB0aGluZy5tZnVuY3Rpb24xKDEwKTsKICAgIHRoaW5nLm1mdW5jdGlvbjIoMjApOwogICAgcmV0dXJuIDA7Cn0KCg==