谁能帮我改错啊,实在不知道哪里错了...
#include<iostream.h>
class vehicle
{
public:
int Maxspeed;
int Weight;
vehicle(int M,int W)
{
Maxspeed=M;
Weight=W;
} ;
void run(){cout<<"running"<<endl;};
void stop(){cout<<"stopping"<<endl;};
};
class bicycle:virtual public vehicle
{
public:
int Height;
bicycle(int M,int W,int H):vehicle(M,W)
{
Height=H;
};
};
class motorcar:virtual public vehicle
{
public:
int seatnum;
motorcar(int M,int W,int S):vehicle(M,W)
{
seatnum=S;
};
};
class Motorcycle:public bicycle,public motorcar
{
public:
Motorcycle(int H,int S):bicycly(H),mortorcar(S)
{
};
void show()
{
cout<<Maxspeed<<Weight<<Height<<seatnum;
};
};
void main()
{
}
[此贴子已经被作者于2006-5-19 11:17:06编辑过]