修改程序
#include<iostream>
using namespace std;
class base
{
private:
int m;
public:
base(int a):m(a){}
void show() const
{
cout<<"m:"<<m<<endl;
}
};
class derived:private base
{
int n;
public:
derived(int a,int b):b(a)
{
n=b;
}
};
void main()
{
derived obj(10,18);
obj.show();
}
问题补充:求详解
绝地无双