このコードがコンパイルとおらない理由がどうしてもわからんです。
class point{
private:
int x;
int y;
public:
point(int a,int b){x = a; y = b;}
virtual void show();
};
void point::show()
{
cout << "x:" << x << endl;
cout << "y:" << y << endl;
}
class 3Dpoint:public point{
private:
int z;
public:
3Dpoint(int a,int b,int c):point(a,b){z = c;}
void show();
};
void 3Dpoint::show()
{
cout << "x:" << x << endl;
cout << "y:" << y << endl;
cout << "z:" << z << endl;
}