#include <iostream>
using namespace std;
class Interfaceable {
public:
virtual void Interface() = 0; // isto é um método puramente virtual
};
class Classe: public Interfaceable {
public:
void Interface();
};
void Classe::Interface() {
cout << "interface\n";
}
void Teste(Interfaceable& p) {
p.Interface();
}
int main() {
auto x = Classe();
x.Interface();
Teste(x);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY2xhc3MgSW50ZXJmYWNlYWJsZSB7CnB1YmxpYzoKICAgIHZpcnR1YWwgdm9pZCBJbnRlcmZhY2UoKSA9IDA7IC8vIGlzdG8gw6kgdW0gbcOpdG9kbyBwdXJhbWVudGUgdmlydHVhbAp9OwoKY2xhc3MgQ2xhc3NlOiBwdWJsaWMgSW50ZXJmYWNlYWJsZSB7CnB1YmxpYzoKICAgIHZvaWQgSW50ZXJmYWNlKCk7Cn07Cgp2b2lkIENsYXNzZTo6SW50ZXJmYWNlKCkgewogICAgY291dCA8PCAiaW50ZXJmYWNlXG4iOwp9Cgp2b2lkIFRlc3RlKEludGVyZmFjZWFibGUmIHApIHsKCXAuSW50ZXJmYWNlKCk7Cn0KCmludCBtYWluKCkgewoJYXV0byB4ID0gQ2xhc3NlKCk7Cgl4LkludGVyZmFjZSgpOwoJVGVzdGUoeCk7CglyZXR1cm4gMDsKfQ==