# include < iostream>
using namespace std;
class stock
{
public :
stock(){x = 0;}
stock(int a){x = a;}
virtual void display()=0;
int getx(){ return x;}
private:
int x;
};
class shstock : public stock
{
public:
shstock( int a){ y=a;}
private:
int y;
};
class szstock : public stock
{
public:
szstock( int a, int b): stock(a){z=b;}
void display(){
cout << getx()<<" "<z<< endl;
}
private:
int z;
};
int main()
{
stock b;
shstock d1(5);/ /compile error
szstock 2(5,б);
//compile error
d2. display();
return 0;
}