#include <iostream>
using namespace std;
class mother {
public:
mother()
{
cout << "mother\n";
}
};
class daughter : public mother {
public:
daughter() :mother()
{
cout << "daughter\n";
}
}; class son : public mother {
public:
son() :mother()
{
cout << "son\n";
}
};
int main()
{
daughter cynthia;
son daniel;
return 0;
}
标签:daughter,cout,class,son,mother,public,指导书 From: https://www.cnblogs.com/pinganxile/p/17327745.html