#include <string>
using namespace std;
class Teste2 {
int x;
int y;
public:
Teste2(int x, int y) {}
};
class Testando {
Teste2 *teste2;
public:
Testando(Teste2 *teste2) {}
};
class Teste : public Testando {
string nome;
int numero;
public:
//Supondo que Teste2 teste2 foi instanciado na Classe Testando
Teste(Teste2 *teste2, string nome, int numero) : Testando(teste2) {
this->nome = nome;
this->numero = numero;
}
};
int main() {
auto teste = Teste(new Teste2(1, 2), "joão", 1);
}
I2luY2x1ZGUgPHN0cmluZz4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKY2xhc3MgVGVzdGUyIHsKCWludCB4OwoJaW50IHk7CglwdWJsaWM6CgkgICAgVGVzdGUyKGludCB4LCBpbnQgeSkge30KfTsKY2xhc3MgVGVzdGFuZG8gewogICAgVGVzdGUyICp0ZXN0ZTI7CglwdWJsaWM6CgkgICAgVGVzdGFuZG8oVGVzdGUyICp0ZXN0ZTIpIHt9Cn07CmNsYXNzIFRlc3RlIDogcHVibGljIFRlc3RhbmRvIHsKICAgIHN0cmluZyBub21lOwogICAgaW50IG51bWVybzsKICAgIHB1YmxpYzoKICAgICAgICAgLy9TdXBvbmRvIHF1ZSBUZXN0ZTIgdGVzdGUyIGZvaSBpbnN0YW5jaWFkbyBuYSBDbGFzc2UgVGVzdGFuZG8KICAgICAgICBUZXN0ZShUZXN0ZTIgKnRlc3RlMiwgc3RyaW5nIG5vbWUsIGludCBudW1lcm8pIDogVGVzdGFuZG8odGVzdGUyKSB7ICAgICAgCiAgICAgICAgICAgIHRoaXMtPm5vbWUgPSBub21lOwogICAgICAgICAgICB0aGlzLT5udW1lcm8gPSBudW1lcm87CiAgICAgICAgfQp9OwppbnQgbWFpbigpIHsKCWF1dG8gdGVzdGUgPSBUZXN0ZShuZXcgVGVzdGUyKDEsIDIpLCAiam/Do28iLCAxKTsKfQ==