What will the following code print when creating an instance of class X:
#include <iostream>
using namespace std;
class Y {
public:
Y() { cout << "Y"; }
};
class Z {
public:
Z() { cout << "Z"; }
};
class X : public Z {
private:
Y m_objY;
public:
X() { cout << "X"; }
};
Login in to like
Login in to comment