程序编译错误 求指教
#include <iostream>using namespace std;
class vehicle{
public:
void run (){};
void stop (){};
vehicle(double ms,double w){
maxspeed=ms;
weight=w;
cout<<"constring vehicle in called"<<endl;}
private:
double maxspeed;
double weight;
};
class bicycle:public vehicle{
public:
bicycle(double h,double ms,double w):vehicle(ms,w){
hight=h;
cout<<"constring bicycle is called"<<endl;}
private:
double hight;
};
class motorcar:public vehicle{
public:
motorcar(double n,double ms, double w):vehicle(ms,w){
seatnum=n;
cout<<"constring motorcar is called"<<endl;}
private:
double seatnum;
};
class motorcycle:public bicycle,public motorcar{
public:
motorbicycle(double n,double h,double ms,double w):bicycle(double h,double ms,double w),
motorcar(double n,double ms,double w)
{cout<<"constring of motorbicycle is called"<<endl;}
};
int main(){
motorbicycle m1(1.0,2.0,3.0,4.0);
return 0;
}