什么是子类型 花木兰替父从军 公有继承时, 派生类的对象可以作为基类的对象处理,派生类是基类的子类型。 Son类就是Father类的子类型. #include <iostream> #include <Windows.h> using namespace std; class Father { public: Father() { } ~Father() { } void kill() { cout << "Father 上战场杀敌" << endl;