1-多继承的概念.cpp
#include <iostream>
using namespace std;
class Airplane
{
protected:
int high;
public:
Airplane()
{
cout << "飞机的构造函数" << endl;
high = 100;
}
void show()
{
cout << "飞行高度 " << high << endl;
}
};
class Ship
{
protected:
int speed;
public:
Ship()
{
cout << "轮船的构造函数" << endl;
speed = 50;
}
void show()
{
cout << "航行的速度 " << speed << endl;
}
}