对继承与派生不够了解,找不到错误

img


#include <iostream>
using namespace std;
class Base
{
private:
int m;
public:
Base(int a):m(a){}
Base(const Base &copy){m=copy.m;}
void Show() const
{cout<<"m:"<<m<<endl;}
};
class Derived:private Base
{
protected:
int n;
public:
Derived(int a,int b):Base(a),n(b){}
void Show() const
{
Base::Show();
cout<<"n:"<<n<<endl;
}
};

int main(void)
{
Derived obj(10,18);
obj.Show();
getchar();
return 0;
}

img

没问题啊,是编译不通过吗,可以看看运行吗